Y
Yi
I wanted to use VB.NET to automate Word to create a customized toolbar and
assign the toolbar to a certain template, so that only when opening a file
created based on this template, this customized toolbar will be displayed.
I did the following manually using Office XP:
- Select menu item "tools/customize", "toolbars" tab. Press button "New".
- In the "New Toolbar" dialog, list "Make toolbar available to", select one
item, e.g. "Document1". Press "OK".
- Close the "Customize" dialog.
I recorded a Macro for these operations but found the Macro does not tell
how to assign the toolbar to the template. The Macro contains only one
command "CommandBars.Add(Name:="Custom 1").Visible = True".
Is there a method to do the same operation with VB code? Or is there other
way to display a customized toolbar only to a group of documents that are
created with a certain template?
Best wishs,
Yi
assign the toolbar to a certain template, so that only when opening a file
created based on this template, this customized toolbar will be displayed.
I did the following manually using Office XP:
- Select menu item "tools/customize", "toolbars" tab. Press button "New".
- In the "New Toolbar" dialog, list "Make toolbar available to", select one
item, e.g. "Document1". Press "OK".
- Close the "Customize" dialog.
I recorded a Macro for these operations but found the Macro does not tell
how to assign the toolbar to the template. The Macro contains only one
command "CommandBars.Add(Name:="Custom 1").Visible = True".
Is there a method to do the same operation with VB code? Or is there other
way to display a customized toolbar only to a group of documents that are
created with a certain template?
Best wishs,
Yi