Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need Help with Word 2007 addin

6 views
Skip to first unread message

DMUM

unread,
Mar 17, 2012, 10:51:09 PM3/17/12
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


0 new messages