New feature! Upgrade and increase expert visibility of your issues with Priority Questions.
Sub BookmarkInstancesOfStyle Dim strLanguages As Variant Dim i As Long Dim frange As Range i = 0 Selection.HomeKey wdStory Selection.Find.Style = ActiveDocument.Styles("user-style") strLanguages = Array("de", "en", "es", "fr", "it") With Selection.Find Do While .Execute(FindText:="", Forward:=True, _ MatchWildcards:=False, Wrap:=wdFindStop, MatchCase:=False) = True Set frange = Selection.Range ActiveDocument.Bookmarks.Add "MainTOC_" & strLanguages(i), frange i = i + 1 Selection.Collapse wdCollapseEnd Loop End With End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.