vs2010中自动给函数或者类加上注释宏模板
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
Sub AddFunComment() Dim DocSel As EnvDTE.TextSelection DocSel = DTE.ActiveDocument.Selection DocSel.NewLine() DocSel.Text = "/*******************************************************************" DocSel.NewLine() DocSel.Text = "* File Name: " DocSel.NewLine() DocSel.Text = "* Author: ZhangFeng " DocSel.NewLine() DocSel.Text = "* Date: " + System.DateTime.Now.ToLongDateString() DocSel.NewLine() DocSel.Text = "* brief: " DocSel.NewLine() DocSel.Text = "* version: " DocSel.NewLine() DocSel.Text = "********************************************************************* " DocSel.NewLine() DocSel.Text = "* History change record " DocSel.NewLine() DocSel.Text = "********************************************************************* " DocSel.NewLine() DocSel.Text = "* version: Date: Changer " DocSel.NewLine() DocSel.Text = "* Modify content: " DocSel.NewLine() DocSel.Text = "********************************************************************* " DocSel.NewLine() DocSel.Text = "* All Right Reserved. Copyright(C) 2018 Clarion Co., Ltd. " DocSel.NewLine() DocSel.Text = "*********************************************************************/ " End Sub