1. Put it in a standard code module e.g., in your normal tempalte See:
http://gregmaxey.mvps.org/word_tip_p...ng_macros.html for instructions to employ VBA code.
2. Yes.
3. Pass the bracket characters as argument to another procedure:
Code:
Sub CallMeWhateverYouWant()
BracketSelectedText 'default is parens.
BracketSelectedText Chr(147), Chr(148) 'smart quotes
BracketSelectedText Chr(34), Chr(34) 'straight quotes
BracketSelectedText "<", ">"
BracketSelectedText "[", "]"
BracketSelectedText "{", "}"
End Sub
Sub BracketSelectedText(Optional strPre As String = "(", Optional strSuf As String = ")")
Application.ScreenUpdating = False
With Selection
.InsertBefore strPre
.InsertAfter strSuf
End With
Application.ScreenUpdating = True
End Sub