VC注释宏COMMENTMAC
Sub LineComment()
lTopLine = ActiveDocument.Selection.TopLine
lBottomLine = ActiveDocument.Selection.BottomLine
For I = lTopLine To lBottomLine
ActiveDocument.Selection.MoveTo I,1
ActiveDocument.Selection.SelectLine
s = ActiveDocument.Selection.Text
if left(s,2) = "//" then
s = right(s,len(s)-2)
else
s = "//" + s
end if
ActiveDocument.Selection.Text = s
Next
End Sub