Hi pcavacas,
I think you need a little bit more than what Dream gave you, so:
1/ Start a new blanc document.
2/ Go To VB Editor, and to the ThisDocument pane of the document you just created and paste code below
Private Sub Document_Open()
Dim ctr As CommandBarControl, myPos As Integer
Dim nIt As CommandBarControl
With CommandBars("Menu Bar")
On Error Resume Next
Set ctr = .Controls("Company Trademarks")
If Err.Number = 0 Then
Err.Number = 0
On Error GoTo 0
Exit Sub
Else
Err.Number = 0
On Error GoTo 0
End If
For Each ctr In .Controls
If ctr.Caption = "&Help" Then myPos = ctr.Index
Next ctr
Set ctr = .Controls.Add(Type:=msoCon
ctr.Caption = "&Company Trademarks"
ctr.Visible = True
ctr.Enabled = True
With ctr
Set nIt = .Controls.Add(Type:=msoCon
nIt.Caption = "Company (R)"
nIt.Tag = "R"
nIt.OnAction = "InsertTheSymbol"
nIt.Style = msoButtonCaption
Set nIt = .Controls.Add(Type:=msoCon
nIt.Caption = "General"
Set nIt = .Controls("General").Contr
nIt.Caption = "Trademark1 (R)"
nIt.Tag = "R"
nIt.OnAction = "InsertTheSymbol"
nIt.Style = msoButtonCaption
Set nIt = .Controls("General").Contr
nIt.Caption = "Trademark2 (TM)"
nIt.Tag = "TM"
nIt.OnAction = "InsertTheSymbol"
nIt.Style = msoButtonCaption
Set nIt = .Controls.Add(Type:=msoCon
nIt.Caption = "Some Category"
Set nIt = .Controls("Some Category").Controls.Add(Ty
nIt.Caption = "Product1 (R)"
nIt.Tag = "R"
nIt.OnAction = "InsertTheSymbol"
nIt.Style = msoButtonCaption
Set nIt = .Controls("Some Category").Controls.Add(Ty
nIt.Caption = "Product2 (R)"
nIt.Tag = "R"
nIt.OnAction = "InsertTheSymbol"
nIt.Style = msoButtonCaption
End With
End With
ThisDocument.VBProject.VBC
NormalTemplate.VBProject.V
End Sub
3/ Create a new code module (Right-click the document in the VB Editor, select Insert/Module
4/ Paste the code below in module1 (the module you just created)
Sub InsertTheSymbol()
Selection.TypeText CommandBars.ActionControl.
If CommandBars.ActionControl.
Selection.InsertSymbol Font:="CommercialPi BT", CharacterNumber:=-3983, _
Unicode:=True
ElseIf CommandBars.ActionControl.
Selection.InsertSymbol Font:="CommercialPi BT", CharacterNumber:=-3995, _
Unicode:=True
End If
End Sub
5/ Save the document
Now all you have to do is distribute this document to your users, who just have to open it once (WITH MACROS ENABLED) and the macros will do all the work.
6/ Your users of course in the end need to confirm that changes to normal template need to be saved, if they have that option of being prompted for this selected.
Good Luck
calacuccia
Main Topics
Browse All Topics





by: DreamboatPosted on 2002-08-21 at 19:33:56ID: 7235009
Imagine.
e.com/Appl ications/M S_Office/ Q _20339002. html
I JUST answered this in another Q:
http://www.experts-exchang
~Dreamboat
www.TheWordExpert.com