DMUM
unread,Mar 17, 2012, 10:51:09 PM3/17/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Hi I have created an addin in MS word. It Hijacks the beforesave and beforesaveas events so that a process can be ran before the actual save occurs. My addin is in the STARTUP file locations and has been installed globally using the MS Word Addins popup box. However, when I open a new document, type some info and then click save or save as, the addin is not used.
I have this portion of code in the addin Class Module
Public With Events appword as Word.Application
Public Sub appWord_DocumentBeforeSaveAs(ByVal Doc As Document, SaveAsUI As Boolean, Cancel As Boolean)
Call MacroAddInTst1.EditingMacroComments
End Sub
Public With Events appword as Word.Application
Public Sub appWord_DocumentBeforeSave(ByVal Doc As Document, Save As Boolean, Cancel As Boolean)
Call MacroAddInTst1.EditingMacroComments
End Sub
The Module containing the code to run the document check is in a separate module(not class module). The module is named MacroAddInTst1
The sub in the module is EditMacroComments
This is why I am using MacroAddInTst1.EditingMacroComments to call the actual action that needs to occur. I got an error when I only used Call EditMacroComments stating that it could not be found. However, this is not the issue,the code does nt even reach this portion, it does not even register that there is a SaveAS or Save in the addin, it never gets activated. Can someone tell me what I'm doing wrong?
Thanks