Programatically Add Button To Menubar 
Author Message
 Programatically Add Button To Menubar

I am opening an instance of Word from MS Access. Can someone help me with the
code for when the instance of Word opens, a new button is programatically
created on the menubar that will make the instance of Word not visible when
pressed. This I think will expose Access again.

I don't want the button to be permanent, so I also need the code that when the
instance of Word closes, the button is deleted.

Thanks for all help!

Steve



Wed, 31 Aug 2005 17:57:55 GMT  
 Programatically Add Button To Menubar
Hi Steve,

The better venue for this question would be one of the word.vba newsgroups;
you've posted in a primarily end-user group...

Putting the button in the Word environment isn't a big problem, using the
CommandBars object model of Office. It would help a bit to know:
- which version of Word
- On which toolbar (or possibly a custom toolbar?) the button should appear on

A bigger problem is removing the button, because of the necessity to link that
to closing Word (as you say). That code would have to be in the Word
environment, I should think... What kind of document is Word opening or
generating when Access calls it?

Quote:
> I am opening an instance of Word from MS Access. Can someone help me with the
> code for when the instance of Word opens, a new button is programatically
> created on the menubar that will make the instance of Word not visible when
> pressed. This I think will expose Access again.

> I don't want the button to be permanent, so I also need the code that when the
> instance of Word closes, the button is deleted.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)



Tue, 06 Sep 2005 22:41:41 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Programatically adding a macro button to the ActiveInspector window

2. Capturing System close menubar and button commands

3. Changing menubar buttons with form

4. The "New" button in the menubar

5. Create a button on IE & Netscape menubar

6. Create a button on IE & Netscape menubar

7. add a menu separation bar to a custom menubar

8. adding a menubar to a userform

9. Add an item to MenuBar on newDocument

10. Can you add these controls to the menubar?

11. How to add Icon/Pics to menubar

12. Adding a menubar to a coolbar (VB6)

 

 
Powered by phpBB® Forum Software