BUG in TextSelection.Insert ?

Hi,

I have lot of Macros which I did for VS.NET 2003 which use :

Dim TS As TextSelection = DTE.ActiveDocument.Selection
TS.Insert("__END", vsInsertFlags.vsInsertFlagsInsertAtEnd)

which have to insert text at the end of selection, but I do not know for what reason in Visual Studio .NET 2005 it does not work (it inserts text at start what is absolutely bad !!! Sad - seams to be like bad nightmare SadSadSad)

Why is behavior of same method absolutely changes between VS.NET 2003 and 2005 releases Or am I doing something wrong

Thanks for reply.


Answer this question

BUG in TextSelection.Insert ?

  • dehinson

    BJ,

    The vsInsertFlagsInsertAtEnd means at the end of the selection.  I am not sure why it changed between VS2003 and VS2005, however, there are plenty of other ways to do this.

    Try this code:



    Dim TS As TextSelection = DTE.ActiveDocument.Selection
    TS.EndOfLine(
    False)
    TS.Insert(
    "__END")

     


    Thanks,

    Dylan


  • BUG in TextSelection.Insert ?