Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a Word event macro fire in active document
Hi
This is a cross post originally to a Word programming group. Unfortunately, you can practically see the tumbleweed blowing down the main street of the Word groups... If anyone in here could answer this I'd be most grateful: I have an application level event macro (in class module) that creates a popup menu Public WithEvents WordApp As Word.Application Private Sub WordApp_WindowBeforeRightClick(ByVal Sel As Selection, Cancel As Boolean) Make_FreePopUp Cancel = True End Sub The document_open event macro in ThisDocument is Private Sub Document_Open() Set wdApplication.WordApp = Word.Application End Sub and in a general module I have Public wdApplication As New Class1 Public Sub Make_FreePopUp() 'etc End Sub This works fine in its template document tester.dot. It also works fine in the active document if tester.dot is open. i've followed two suggestions as to how to make this available to the active document without tester.dot being visible. Try 1: put the template file in the startup folder Try 2: go to Tools, templates and AddIns.. and add it to the Global templates and AddIns list Neither option fires the macro in the active document. I don't want to change normal.dot as this will disable the normal right click menu. I'm completely new to word macros but know Excel VBA pretty well, where i can simply put Is AddIn = True on the file and add it to the users AddIn list. What is the equivalent process in Word?? Again, apologies for the cross post but this apparently simple issue is driving me nuts. regards Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a Word event macro fire in active document
Hi Paul,
Had the same problem a while ago ... If I recall correctly: AddIns.Add FileName:= "C:\Test.dot" , Install:=True HTH Carim |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Make a Word event macro fire in active document
Hi Carim
Thanks for that - where does this go? In the ThisDocument open sub? regards Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Event doesn't fire | Excel Discussion (Misc queries) | |||
Event class doesn't fire in embedded VBA | Excel Programming | |||
Macro to copy cell data to word document based on an active row? | Excel Programming | |||
Event to fire when pivottable is pivoted | Excel Programming | |||
Worksheet_Change event won't fire to execute Macro??? | Excel Programming |