locked
Change name of a bookmark using a macro? RRS feed

  • Question

  • When I set a bookmark and I have text selected in the line, I would like the bookmark name to be the selected text.

    Since that does not work, I would like to iterate through the list of bookmarks and change the name of a bookmark based on matching file and line numbers.

    Can this be done in a macro (how do I find and change the bookmark name)? I am using Visual Studio 2010.

    Regards,

    Frank

    Friday, April 15, 2011 3:06 PM

Answers

  • I added this to Microsoft Connect:

    https://connect.microsoft.com/VisualStudio/feedback/details/662819/change-name-of-a-bookmark-using-a-macro

    Regards,

    Frank

    • Proposed as answer by Victor_Chen Tuesday, April 19, 2011 2:54 AM
    • Marked as answer by Victor_Chen Wednesday, April 27, 2011 8:19 AM
    Monday, April 18, 2011 1:03 PM

All replies

  • Hi Frank,

     

    Thanks for your post.

    As far as I know, there are several ways to add bookmark programmatically,

    TextSelection.SetBookmark(), EditPoint.SetBookmark() and the IVsTextLines.CreateLineMarker()

    but there is no interface helps modify bookmark name.

    Thanks for understanding.

    Best Regards,

    Ziwei Chen

     

     

     

     

     


    Ziwei Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 18, 2011 8:42 AM
  • I added this to Microsoft Connect:

    https://connect.microsoft.com/VisualStudio/feedback/details/662819/change-name-of-a-bookmark-using-a-macro

    Regards,

    Frank

    • Proposed as answer by Victor_Chen Tuesday, April 19, 2011 2:54 AM
    • Marked as answer by Victor_Chen Wednesday, April 27, 2011 8:19 AM
    Monday, April 18, 2011 1:03 PM