Hi Dirk
OK, let's go back to first principles. Since you said your startup folder
was named OPSTARTEN, I'm assuming you don't have an English language version
of Word, so you may have to translate the menu items.
First, do Tools > Options > Security. Click the Macro Security button.
You'll see the Security dialog. On the Trusted Publishers tab, tick the
button "Trust all installed add-ins and templates" and click OK, OK to get
back to Word.
Now, create a little test like this:
1. File > New. In the task pane, choose "On my computer". You'll see the
Templates dialog box. In the bottom right hand corner, choose to create a
new Template, and then click OK.
2. Word should have created "Template 1" or a name like that.
3. Alt-F11 to open up the VBE. In the project explorer list, click the item
with name of the template (eg "Template 1") and then do Insert > Module.
4. Paste the following into the code area
Public Sub AutoExec()
MsgBox "This message is from " & ThisDocument.Name
End Sub
5. Close the VBE to get back to the template itself.
6. Tools > Options. On the File Locations tab, identify the location of the
Statup folder. Make sure it hasn't been changed somehow.
7. Save the template in your Word startup folder.
8. Exit Word and re-start Word.
9. Expect:
(a) to see the message box
(b) at Tools > Templates and Add-ins you can see your Add-in listed and
ticked.
OK?
Hope this helps.
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word- Tekst uit oorspronkelijk bericht niet weergeven -
- Tekst uit oorspronkelijk bericht weergeven -