Levski
05-02-2005, 03:18 PM
I have inserted a new menu on the toolbar within which I will have several items of the same macro:
Sub Macro1()
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"DOCVARIABLE ""Name""", PreserveFormatting:=True
End Sub
What I would like to do is replace 'Name' with whatever references the label of the item that has been clicked.
Can this be done?
Sub Macro1()
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"DOCVARIABLE ""Name""", PreserveFormatting:=True
End Sub
What I would like to do is replace 'Name' with whatever references the label of the item that has been clicked.
Can this be done?