Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42441

Word Add In won't work

$
0
0
Hi everyone. I am trying learning about how a Word Add-in works. Checking some sites on Google I was able to understand that to create an Add-in you do the following:

(i) create a Word template (.dotm in Word 2010)
(ii) in the VB Editor insert a module and inside this module add a sub
(iii) save and close this file pasting it in the Office startup folder (I have XP) '\Documents and Settings\Username\ etc.....

I did all of this and my module contained the following to insert a message box once any Word document that opens. My code was:

sub displayMessage()

msgbox "Hello There"

end sub

I closed the template, then opened a Word document I had already created, but no message box appeared.

My understanding was that once the template was loaded(I checked and it was loaded as a Global template) the module would run. But it did not.

Can anyone help here?

Regards

Tim Christopher

Viewing all articles
Browse latest Browse all 42441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>