comment macro
Dim sTemp As String
With Selection.Find
.ClearFormatting
.Text = "\C*\C"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.MatchWildcards = True
End With
Do While Selection.Find.Execute
sTemp = Selection.Text
sTemp = Mid(sTemp, 2, Len(sTemp) - 2)
sTemp = Trim(sTemp)
Selection.Text = ""
Selection.MoveEnd Unit:=wdCharacter
Selection.MoveStart Unit:=wdCharacter, Count:=-1
If Selection.Text = " " Then Selection.Text = " "
Selection.Collapse
ActiveDocument.Comments.Add Range:=Selection.Range, Text:=sTemp
Loop
|