ATS was telling us: ATS nous racontait que :
[Quoted Text] > HOWTO Add a button to Word's current toolbar. > > Please help, > > I'm using VC++ and I want to add a button to a Word toolbar. I want > the button to invoke a macro I make on the fly, but first I need to > gett he button there. The difficulties I see are as such: > > 1) Given the Application object, how do I find which tool bars (or > command bars) are currently up?
Check each commandBar Visible value
> 2) Are there "default" Word toolbars that should always be available, > so I do not have to loop through all toolbars to find one I can use?
The only one you can almost be certain that will be there all the timne is the menu bar.
Dim myMenuBar As CommandBar Set myMenuBar = CommandBars.ActiveMenuBar
Which returns an object pointing to the menu bar.
> 3) Can I add a toolbar button to the main menu bar where things like > the "File Meno" reside?
Yes. But this is a VBA group. I do not know how you would do this with VC++
-- Salut! _______________________________________ Jean-Guy Marcil - Word MVP jmarcilREMOVE[ at ]CAPSsympatico.caTHISTOO Word MVP site: http://www.word.mvps.org
|