View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom Stefan Blom is offline
external usenet poster
 
Posts: 8,428
Default Add Style to Bookmarks

If you are saying that you want to format text enclosed in bookmarks,
something like this should work:

Sub TestFormatBm()

Dim bm As Bookmark
ActiveDocument.Bookmarks.ShowHidden = False
For Each bm In ActiveDocument.Bookmarks
bm.Range.Style = "char style name here"
Next bm

End Sub

The code applies a character style to the text of each bookmark found in the
document. Of course, "char style name here" should be replaced with a
relevant, existing character style name.

If you want to format text enclosed in hidden bookmarks as well, change
..ShowHidden to True.

For assistance with the macro, see
http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP


"DeanH" wrote in message
...
If you want is to make the Bookmarks visible (i.e. the cross-references to
a
bookmark). Turn on the option Field Shading to Always (this is under the
Word
Options, View), all the cross references and any other fields in your
document will now have a grey shading.
If you want the Bookmark itself to be visible, turn on the Bookmarks
option
in the Show section, now the Bookmark square brackets will be visible.
The above is described as for 2003 as I don't have 2007, hopefully though
it
will point you to the right place.
Now if you you want to apply a style, at least you can now see them.
I don't think there is a Find/Replace option to do what you want. Maybe a
macro guru can add a programming solution.
Hope this helps
DeanH

"sisdog" wrote:

Hi all. I'm using Word 2007 and I would like to change the style of
all the bookmarks in my document. Is there a standard style that I
can tap into to change the look-n-feel of all my bookmarks at once?

Thanks