Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2004

Tip: Looking for answers? Try searching our database.

onaction calls macro in second document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luc Benninger - 26 Nov 2004 10:38 GMT
I have document (A) which contains some macros. In another document (B)
I am dynamically creating a CommandBarButton using VBAs AutoOpen
procedure. The buttons OnAction property should now call a macro from
the document A. But even if both documents are open, the macros in A
seem not to be visible???
How should the OnAction string look like? or do you see other posibilities?
Thanks in advance!
Luc
Jonathan West - 26 Nov 2004 12:27 GMT
>I have document (A) which contains some macros. In another document (B) I
>am dynamically creating a CommandBarButton using VBAs AutoOpen procedure.
[quoted text clipped - 5 lines]
> Thanks in advance!
> Luc

From one macro, you can call a macro in another open document or template
using the Application.Run method. There are details in the VBA Help.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.