bookmark sections

A

andreas

Dear Experts:

below code bookmarks the penultimate section with the bookmark name
"SubTOC_IT".

I would like to get below macro expanded to include the following:

- Sections 2 to 6 are to be bookmarked
- The bookmark names are to be as follows (in this order):
"SubTOC_DE"
"SubTOC_EN"
"SubTOC_ES"
"SubTOC_FR"
"SubTOC_IT"

Thank you very much in advance for your great and professional help.

Regards, Andreas




Sub Bookmark_Penultimate_Section()

Dim mySec As Section
With ActiveDocument
If .Sections.Count > 1 Then
Set mySec = .Sections(.Sections.Count - 1)
..Bookmarks.Add Name:="SubTOC_IT", Range:=mySec.Range
End If
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top