Current Line For Visual Studio Macros

Posted by Vadim on Stack Overflow See other posts from Stack Overflow or by Vadim
Published on 2010-03-29T13:47:58Z Indexed on 2010/03/29 13:53 UTC
Read the original article Hit count: 353

Filed under:
|
|
|

How can I read text of a current line (where cursor is situated) from Macros?

I'm going to use such a fucntion:

 Public Sub AddTextToChangeLogFile()
    Dim textOnACurrentLine As ???
    textOnACurrentLine = ???

    If textOnACurrentLine.Text <> String.Empty Then
        Dim sw As New StreamWriter("C:\###\Changes.txt", True)
        sw.WriteLine(textOnACurrentLine + ". file: " + DTE.ActiveDocument.Name)
        sw.Close()
    End If
End Sub

© Stack Overflow or respective owner

Related posts about .NET

Related posts about winforms