Andreas Hermle
asked on
Create bookmarks for sections using VBA
Dear Experts:
I would like to automatically (using VBA) add bookmarks to my multi-section document ...
... with each bookmark encompassing all the text of the respective section.
The bookmark names are to be based on a paragraph in each section that are formatted with a custom paragraph style.
I have attached a sample file for your convenience.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
add_bookmarks_based_on_sections.docx
I would like to automatically (using VBA) add bookmarks to my multi-section document ...
... with each bookmark encompassing all the text of the respective section.
The bookmark names are to be based on a paragraph in each section that are formatted with a custom paragraph style.
I have attached a sample file for your convenience.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
add_bookmarks_based_on_sections.docx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Wow, great, exactly what I was looking for. A real great job, Rgonzo, thank your very mcuh for your professional and quick help.
Regards, Andreas
Regards, Andreas
ASKER
great, works like a charm, thank you very,very much for it.
There is one thing I should have been more specific in my inital question:
"... The bookmark names are to be based on a paragraph in each section that are formatted with a custom paragraph style."
That custom paragraph style is called 'My_Custom_Style' and I have attached a new sample file to better show my case, i.e. the bookmark names should reflect that particular paragraph text.
The one and only paragraph of each section formatted with this custom paragraph style is not necessarily the first paragraph of each section.
Thank you very much in advance
Regards, Andreas
add_bookmarks_based_on_paragraph_st.docx