D
Dennis S
I am a little confused about commandbars and their interaction with
normal.dot. I have a code template which is loaded during WORD application
startup via the startup folder. The AUTOEXEC code of the template loops
through all the controls of the "Menu Bar". If the custom commandbar exists,
it deletes the control. The custom control is then added to the "Menu Bar".
For Each ctrlCM in CommandBars("Meu Bar").Controls
if ctrl.Caption ="CM" Then
ctrlCM.Delete
endif
Next
Set cbrMenuCM = CommandBars("Menu
Bar").COntrols.Add(Type:=msocontrolPopup, temporary:=true)
cbrMenuCM.Caption = "CM"
Set btnCBarItem1 = cbrMenuCM.Controls.Add(Type:=msoControlButton,
temporary:=True)
with btnCBarItem1
.Caption = "Remove Extra Paragraphs"
.OnAction = "RemoveExtraParagraphs"
end with
normal.dot. I have a code template which is loaded during WORD application
startup via the startup folder. The AUTOEXEC code of the template loops
through all the controls of the "Menu Bar". If the custom commandbar exists,
it deletes the control. The custom control is then added to the "Menu Bar".
For Each ctrlCM in CommandBars("Meu Bar").Controls
if ctrl.Caption ="CM" Then
ctrlCM.Delete
endif
Next
Set cbrMenuCM = CommandBars("Menu
Bar").COntrols.Add(Type:=msocontrolPopup, temporary:=true)
cbrMenuCM.Caption = "CM"
Set btnCBarItem1 = cbrMenuCM.Controls.Add(Type:=msoControlButton,
temporary:=True)
with btnCBarItem1
.Caption = "Remove Extra Paragraphs"
.OnAction = "RemoveExtraParagraphs"
end with