Need a macro to generate bookmarks from styles in a Word doc

R

Rick

I have a need to generate bookmarks from specific
paragraph styles in Word documents. I'm a technical
writer, but not a programmer of any sort.

I have a macro to generate a single bookmark per button
click. I then plug the bookmarks into a Summary paragraph
as hyperlinks. But this is getting tedious, and if the
bookmarked text contains other than alpha characters my
current macro fails.

Has anyone solved this problem before and are you willing
to share your code? I'd like to be able to click once and
have the macro search the document for a specific
paragraph style (topic heading), copy the text of the
topic heading, delete non-alphabetic characters, replace
space characters with underscores, add this result as a
bookmark, and search for the next topic heading.

Thanks,
Rick
 
C

Chad DeMeyer

Rick,

Why not just generate a table of contents from that style, convert the TOC
field to text, and format it as desired?

Regards,
Chad
 
Top