Add-in on Open

  • Thread starter Thread starter zSplash
  • Start date Start date
Z

zSplash

I have an add-in installed, but when I open Word, it is not "checked" (but
is present). I have tried adding the following code to the open_document
event, but I get an error ("expected variable or procedure, not module.").
Can somebody help?

Addins.Add FileName:="G:\ProjectAddin.dot", Install:=True
With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = "G:\ProjectAddin.dot"
End With

TIA
 
Correction: With this code, I get the error message "method or data member
not found" and when I remove the ".Add" from "Addins.Add", I get the error
message "expected variable or procedure, not module."

I get the code by creating a macro from Word (not from VB), and it "sets up"
the template just fine, but when I try to run the code later, I get the
errors. Please help.

TIA, again
 
If you put the add-in (or a copy of it) in Word's Startup folder, it will be
loaded automatically at startup.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Thanks for your help, Suzanne. The problem with that idea is that there are
about 40 people who use this add-in, and it is in a constant state of
modification. It would be too cumbersome to have to keep "upgrading" the
Startup folder on 80+ PC's. Unless, of course, you think I could put a
shortcut to the file in the Startup folder -- would that "work" as you
suggest?

st.
 
I believe that does work. I've also seen the suggestion of putting such
files in the Workgroup Templates folder, with a shortcut to that folder in
each user's Startup folder.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Thanks for your help, Suzanne. I tried it with a shortcut in the startup
folder for all users, as well as in the workgroup templates folder, but the
add-in still isn't "checked". Then, I tried creating a macro to actually
check the add-in, but I still get the error, "expected variable procedure,
not module", and the add-in is not . Any other ideas?

st.
 
Hi, Suzanne. On more "tweaking", I discover if I put the shortcut in the
startup folder for the user (not in the startup folder for All Users), it
does work. With that realization, I wonder: Is there any way to change the
startup folder? (And, a collary, what the heck is the All Users startup
folder for, if Word doesn't "look" there on startup???)

TIA
 
Modify the startup folder from Tools | Options | File Locations. But is
there a *Word* Startup folder for All Users, or just one for Windows?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
You're right, Suzanne. There is no Word Startup folder for All Users. I
see. Again, thanks so much for all your help.

st.
 
Back
Top