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 / January 2005

Tip: Looking for answers? Try searching our database.

Adding a new menu command in VB6, not VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ianr - 17 Jan 2005 20:26 GMT
I launch word using the word object. I have successfully added menu
items from my vb6 app but I can't get it to handle the event when the
menu item is clicked on.

Set oNewMenu = CBarMenu.Controls.Add(msoControlButton, , SaveAsPosition
+ 1)

With oNewMenu
.Caption = "Do Something"
.OnAction = "MakeSmaller"
End With

Is it possible to handle the OnAction event in my VB6 application?? I
tried to create a function called "MakeSmaller" but it was nevercalled.
It just keeps saying the macro isn't found.
Jean-Guy Marcil - 17 Jan 2005 22:22 GMT
Ianr was telling us:
Ianr nous racontait que :

> I launch word using the word object. I have successfully added menu
> items from my vb6 app but I can't get it to handle the event when the
[quoted text clipped - 11 lines]
> tried to create a function called "MakeSmaller" but it was
> nevercalled. It just keeps saying the macro isn't found.

Have you tried to use the full macro path:
   .OnAction = "ProjectName.ModuleName.MakeSmaller"
???
Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org


Rate this thread:






 
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.