‘——————————————————————————
‘FILE DESCRIPTION: 函数注释,类注释,文件注释 可以在工具->宏->击键中加入快捷键
‘——————————————————————————
Sub FullScreen()
‘DESCRIPTION: 全屏编辑
ExecuteCommand "ToggleFullScreen"
End Sub
Sub AddHeadDesc()
‘DESCRIPTION: 添加一个标准的头文件说明
ActiveDocument.Selection.StartOfDocument
DefaultUserName = "hankcs"
Dim FileName
FileName = ActiveDocument.Name
ActiveDocument.Selection = "/*******************************************************************" +_
vbLF + " 文件名 :" + FileName +_
vbLF + " 创建者 :" + DefaultUserName +_
vbLF + " 创建时间 :" + CStr(Now) +_
vbLF + " 功能描述 :" +_
vbLF + " " +_
vbLF + " ******************************************************************/" +_
vbLF
ActiveDocument.Selection.LineUp flase, 3
ActiveDocument.Selection.EndOfLine
End Sub
Sub AddClassDesc()
‘DESCRIPTION: 添加类注释
Dim ClassName
ClassName = ActiveDocument.Selection.Text
ActiveDocument.Selection.StartOfLine
ActiveDocument.Selection = "/******************************************************************" +_
vbLF + " 类名 :" + ClassName +_
vbLF + " 创建时间 :" + CStr(Now) +_
vbLF + " 功能描述 :" +_
vbLF + " " +_
vbLF + " ******************************************************************/" +_
vbLF
ActiveDocument.Selection.LineUp flase, 3
ActiveDocument.Selection.EndOfLine
End Sub
Sub AddMethodDesc()
‘DESCRIPTION: 添加函数注释
Dim MethodName
MethodName = ActiveDocument.Selection.Text
ActiveDocument.Selection.StartOfLine
ActiveDocument.Selection = "/******************************************************************" +_
vbLF + " 函数名 :" + MethodName +_
vbLF + " 参数 :" +_
vbLF + " 返回值 :" +_
vbLF + " 功能描述 :" +_
vbLF + " " +_
vbLF + " ******************************************************************/" +_
vbLF
ActiveDocument.Selection.LineUp flase, 5
ActiveDocument.Selection.EndOfLine
End Sub