Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event doesn't fire Frank Xia Excel Discussion (Misc queries) 6 February 11th 06 12:54 AM
Event class doesn't fire in embedded VBA Tornados[_5_] Excel Programming 0 September 28th 04 03:27 PM
Macro to copy cell data to word document based on an active row? Brian Excel Programming 2 September 16th 04 01:55 PM
Event to fire when pivottable is pivoted Tod Excel Programming 1 April 5th 04 09:09 PM
Worksheet_Change event won't fire to execute Macro??? jpdill5 Excel Programming 2 February 13th 04 02:34 PM


All times are GMT +1. The time now is 05:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"