tools --> Macro --> Macro Name: AddComment,Edit -->
编辑AddComment,输入:
Sub AddComment()
ActiveDocument.Selection.ReplaceText "^","//",dsMatchRegExp
ActiveDocument.Selection.ReplaceText "^","",dsMatchRegExp
End Sub
存盘后,tools -->Customize-->Keyboard页-->Category 选择 Macros,Commands 选择AddComment,然后和Ctrl+/关联。这样选中一段代码后可以给每一行添加或去除//
,效果和Jbuilder一样
编辑AddComment,输入:
Sub AddComment()
ActiveDocument.Selection.ReplaceText "^","//",dsMatchRegExp
ActiveDocument.Selection.ReplaceText "^","",dsMatchRegExp
End Sub
存盘后,tools -->Customize-->Keyboard页-->Category 选择 Macros,Commands 选择AddComment,然后和Ctrl+/关联。这样选中一段代码后可以给每一行添加或去除//
,效果和Jbuilder一样