有VS2005想做一个自动插入时间的宏,但是不知道VS2005有没有插入日期时间的快捷键,所以只得写了这么一个宏
Option Strict Off
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports System.Diagnostics


Public Module RecordingModule

    Sub Macro1()
        Dim doc As Document = DTE.ActiveDocument
        Dim docText As TextDocument = doc.Object
        Dim selText As TextSelection = docText.Selection()
        selText.StartOfDocument(False)
        Dim str As String = " /****************************** " + vbCrLf & "* 取得数据库中关于数据表的信息" + vbCrLf + "* 作者:蔡兴钰" + vbCrLf + "* 日期:" + System.DateTime.Now.ToString() + vbCrLf + "******************************/ "
        selText.Insert(str)
    End Sub
End Module

相关文章:

  • 2021-12-10
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2021-07-23
  • 2021-10-16
猜你喜欢
  • 2022-12-23
  • 2021-12-14
  • 2021-10-23
  • 2022-01-04
  • 2022-12-23
  • 2021-11-25
  • 2021-12-10
相关资源
相似解决方案