AddIns

G

George

Hi

I have written an application which works as follows:

An AutoExec-macro in a dot-template (A), which
is placed in the Word-StartUp-Path, loads
another .dot-Add-In (B).

Two of our clients have the following phenomenon:
Sometimes, B cannot be loaded automatically (VBA)
by A. If it gets added manually by the user, everything
works fine again and B can be loaded by the initial file A
every time MS Word gets started.

This penomenon was reported in both Word 2003
and Word 2007.

Does anybody knows something about this strange
behavior? Thanks for any help.

Best Regards

George
 
D

Doug Robbins - Word MVP

Why don't you just have the second template in the Word\Startup folder?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
A

Adri

I also have a startup template that loads another template (because I don't
always want that other template loaded - only when I need it), and had the
same problem. I found that if I used:

AddIns.Add FileName:="TemplateB", Installed:=True

instead of
AddIns ("TemplateB").Installed = True

it always works.
 
G

George

Dear Adri

Many thanks for your hint. I had the same
considerations of not loading all moduls at
word start.

I will give it a try and come back with the
results.

Best Regards and THANKS

George
 
G

George

Dear Adri

From what I have seen, the line

AddIns ("TemplateB").Installed = True

does only work, if the AddIn was loaded
earlier and is listed (but not activated) in
the Word-AddIns-list.

I now have integrated both commands following
each other with a leading "On Error resume next":

On Error resume next
AddIns.Add FileName:="TemplateB", Installed:=True
AddIns ("TemplateB").Installed = True
On Error goto 0

I hope this works ... do you have experiences on
that or another advice?

Best Regards, George
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top