매크로 만들기
jjuiddong
Sub InsertFunctionComment() Dim textSelection As EnvDTE.TextSelection textSelection = CType(DTE.ActiveDocument.Selection(), EnvDTE.TextSelection) textSelection.Text = "/**" textSelection.NewLine() textSelection.StartOfLine() textSelection.Text = " @brief " textSelection.NewLine() textSelection.StartOfLine() textSelection.Text = " @date " + System.DateTime.Now.Date textSelection.NewLine() textSelection.StartOfLine() textSelection.Text = "*/" textSelection.NewLine() End Sub
Sub InsertHeaderComment() Dim textSelection As EnvDTE.TextSelection textSelection = CType(DTE.ActiveDocument.Selection(), EnvDTE.TextSelection) textSelection.Text = "/**" textSelection.NewLine() textSelection.StartOfLine() textSelection.Text = " @filename " + DTE.ActiveDocument.Name textSelection.NewLine() textSelection.StartOfLine() textSelection.Text = " " textSelection.NewLine() textSelection.StartOfLine() textSelection.Text = " " textSelection.NewLine() textSelection.StartOfLine() textSelection.Text = "*/" textSelection.NewLine() End Sub