F
Franz Lang
Hi!
I have two word templates with simple vba code on a server where
I have unrestricted access. In template "base.dot" there is a vba
project (named "basis") with a module "letter" with a public
function "message" which presents a message box. In the second
template "main.dot" (which is opened using the "new document"
function) I just want to call my "message" function of the first
template. So, in the second template I added a reference to the
"base.dot" template and then I can call the "message" function by
writing "letter.message".
Now, when I open the second template "main.dot" in Word 2007 I
get the error "Projekt or Library not found" and the line in the
VBA code where the "letter.message" is called is highlighted. The
references in my opinion are definitely ok, I even checked them
via VBA code.
The strange thing is that when I then close the template (but not
Word) and open the template again, it does work!
In Word 2000 and 2003 the code and the templates works fine, even
the first time.
I also found out that the code works fine with Word 2007 when the
template "main.dot" resides locally on my computer. But that is
not a solution as several people have to use this template.
Anybody any hint?
Thank you very much in advance,
Franz.
I have two word templates with simple vba code on a server where
I have unrestricted access. In template "base.dot" there is a vba
project (named "basis") with a module "letter" with a public
function "message" which presents a message box. In the second
template "main.dot" (which is opened using the "new document"
function) I just want to call my "message" function of the first
template. So, in the second template I added a reference to the
"base.dot" template and then I can call the "message" function by
writing "letter.message".
Now, when I open the second template "main.dot" in Word 2007 I
get the error "Projekt or Library not found" and the line in the
VBA code where the "letter.message" is called is highlighted. The
references in my opinion are definitely ok, I even checked them
via VBA code.
The strange thing is that when I then close the template (but not
Word) and open the template again, it does work!
In Word 2000 and 2003 the code and the templates works fine, even
the first time.
I also found out that the code works fine with Word 2007 when the
template "main.dot" resides locally on my computer. But that is
not a solution as several people have to use this template.
Anybody any hint?
Thank you very much in advance,
Franz.