none
Hide entire bookmark RRS feed

  • Question

  • I have a 4 page word 2010 template of which the last 2 pages are in a bookmark.  Upon selecting a different option in my task pane I would like to hide the entire bookmark.

    I thought I could just set the font.hidden property to 0 if it should be invisible, otherwise set it to 1.  However when i inspect my add-in during debugging I Always get the font hidden value = 9999999? 

    Is it possible to achieve what i would like to do?


    • Edited by TheOnlyOne Tuesday, June 25, 2013 2:30 PM
    Tuesday, June 25, 2013 2:29 PM

Answers

  • You can format the range enclosed by the bookmark as hidden, if that's what you're asking. A simple example:

    ActiveDocument.Bookmarks("tryout").Range.Font.Hidden = True

    On the other hand, if you are trying to add an actual hidden bookmark, specify a bookmark name that starts with an underscore:

    ActiveDocument.Bookmarks.Add "_hiddenbm", Selection.Range


    Stefan Blom, Microsoft Word MVP

    Tuesday, June 25, 2013 6:58 PM