写注释的宏,vs6.0和vs2003两个版本的

写注释的宏,vs6.0和vs2003两个版本的

一,vc6.0版本
'------------------------------------------------------------------------------
'FILE DESCRIPTION: New Macro File
'------------------------------------------------------------------------------

Sub filedescmacros()
'DESCRIPTION: A description was not provided.


'Begin Recording
 ActiveDocument.Selection = "/"
 ActiveDocument.Selection = "******************************************************************"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "*"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* Copyright (c) 2008, xxxxx有限公司"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* All rights reserved."
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "*"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 文件名称:" + ActiveDocument.Name
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 摘   要: "
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "*"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 当前版本:1.0"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 作    者:吴会然"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 完成日期:" + CStr(Date())
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "*"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 取代版本:"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 原  作者:"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 完成日期:"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "*"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "*"
 ActiveDocument.Selection = "*****************************************************************/"
 ActiveDocument.Selection.LineUp dsMove, 10
'End Recording
End Sub

Sub funcdescmacros()
'DESCRIPTION: A description was not provided.


'Begin Recording
 ActiveDocument.Selection = "/******************************************************************"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 函数介绍:"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 输入参数:"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 输出参数:"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "* 返回值  :"
 ActiveDocument.Selection.NewLine
 ActiveDocument.Selection = "*******************************************************************/"
 ActiveDocument.Selection.LineUp dsMove, 4
'End Recording
End Sub


二,vs2003版本

Option Strict Off
Option Explicit Off
Imports EnvDTE
Imports System.Diagnostics

Public Module RecordingModule


    Sub FileDescMacro()
        DTE.ActiveDocument.Selection.Text = "/********************************************************************"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "*"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* Copyright (c) 2008, xxxxx有限公司"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* All rights reserved."
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "*"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 文件名称: " + DTE.ActiveDocument.Name
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 摘    要: "
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "*"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 当前版本: 1.0"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 作    者: 吴会然"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 完成日期: " + CStr(Now().Date)
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "*"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 取代版本: "
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 原  作者: "
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 完成日期: "
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "*"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "*******************************************************************/"
        DTE.ActiveDocument.Selection.LineUp(False, 11)
        DTE.ActiveDocument.Selection.LineDown()
    End Sub
    Sub FuncDescMacro()
        DTE.ActiveDocument.Selection.Text = "/*******************************************************************"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 函数介绍:"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 输入参数:"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 输出参数:"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "* 返回值  :"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "*******************************************************************、"
        DTE.ActiveDocument.Selection.DeleteLeft()
        DTE.ActiveDocument.Selection.Text = "/"
        DTE.ActiveDocument.Selection.LineUp(False, 4)
    End Sub
End Module

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值