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 / Publisher / Programming / May 2007

Tip: Looking for answers? Try searching our database.

Executing Button Commands of Buttons not in a CommandBar

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cory - 30 May 2007 16:15 GMT
Good morning,

I am attempting to use the .execute function of a number of CommandBar
buttons, and some are not in a command bar.  Now I could add them to a
commandbar, but I do not want to unnecessarily mess with the users settings
by adding/deleting  commandbars.  Is there a way to issue the .execute for a
button that is not in the commandbar?  All of these commands (so far) appear
in the menu (which is a commandbar) but for whatever reason the .controls
sub-collection does not appear to be in the .controls collection as in:
Application.CommandBars(1).Controls(3).Controls(5).Execute
Thus would I be able to execute the 5th item in the view menu.  It doe not
appear that publisher works this way however.  It shows up in the pop-up
dropdown box in Excel and Word VBA, but not Publisher....  yet another
example of the hodge-podge VBA implementation in Pub2002.

Please tell me that Publisher 2007 is better in this regard!  With the way
my company works, we may have 2007 by the end of the next decade...  
Something to look forward to.

Cory
Ed Bennett - 30 May 2007 19:55 GMT
> Thus would I be able to execute the 5th item in the view menu.  It doe not
> appear that publisher works this way however.  It shows up in the pop-up
> dropdown box in Excel and Word VBA, but not Publisher....  yet another
> example of the hodge-podge VBA implementation in Pub2002.

It doesn't show up in IntelliSense in Publisher 2007, but it DOES work.
Just tested it myself.

Signature

Ed Bennett - MVP Microsoft Publisher
http://ed.mvps.org

Cory - 31 May 2007 11:47 GMT
Hmm I must have mistypes something somewhere then...  Thank you.  I will go
over my code and check it out.

> > Thus would I be able to execute the 5th item in the view menu.  It doe not
> > appear that publisher works this way however.  It shows up in the pop-up
[quoted text clipped - 3 lines]
> It doesn't show up in IntelliSense in Publisher 2007, but it DOES work.
> Just tested it myself.

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.