Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add items to WORD standard toolbar

Status
Not open for further replies.

SysAdmMke

Technical User
Jan 18, 2006
34
0
0
US

How would I add the SAVEAS icon to the Word 2003 standard toolbar using vbscript?

Thanks
Mike
 
You would need to do it in VBA. Open word record a macro add your button stop recording, save it as a add-in for redistribution.
Lot's of tut's on the net
 
You can use automation:

Code:
msoControlButton=1
msoButtonCaption=2
SaveAsID=748
PositionBefore=1

Set ws=CreateObject("Word.Application")
ws.Visible=True

ws.Documents.Open "C:\Docs\Tek-Tips.doc"
ws.CustomizationContext = ws.ActiveDocument.AttachedTemplate
ws.CommandBars("Standard").Controls.Add msoControlButton, SaveAsID, PositionBefore

Set ctl = ws.CommandBars.FindControl (msoControlButton, SaveAsID)

ctl.Style = msoButtonCaption
 
Oops. Add another comma here:

[tt]ws.CommandBars("Standard").Controls.Add msoControlButton, SaveAsID,[red],[/red] PositionBefore[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top