Quote:
Originally Posted by stusic
One question I ran into, but didn't want to resurrect a dead thread: What if I don't have any bookmarks in my doc? I get an error when I get to this:
Code:
Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\HeadingLeve3")
As a guess, I tried this (but didn't work either, surprised /s)
Code:
Set Rng = Rng.GoTo(What:=wdGoHeading, Name:="\HeadingLeve3")
|
Your code is incorrect. The code linked to by macropod is:
Code:
Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel")
You can learn more about predefined bookmarks in Word at
Predefined Bookmarks | Microsoft Learn