Sub FindLine()
        Dim textSelection As TextSelection

        textSelection = DTE.ActiveDocument.Selection
        textSelection.CharLeft(True)
        DTE.ExecuteCommand("Edit.replace")
        DTE.Find.FindWhat = textSelection.Text
        DTE.Find.ReplaceWith = textSelection.Text
    End Sub

成都-零  15:38:47
因为文本框有记忆,所以你find一次,再find一次,把替换那儿调出刚才的内容就行了.
广州-小牛  15:42:50
哈哈 人才啊  这个办法好
就可以了
FindLine把多行查找改为多行替换
加上一个  ReplaceMultiline

相关文章:

  • 2021-08-27
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
猜你喜欢
  • 2021-12-12
  • 2022-12-23
  • 2021-08-01
  • 2022-02-09
  • 2022-12-23
  • 2022-02-09
相关资源
相似解决方案