PDA

View Full Version : Solved: Determing Bookmark "Parent"



MWE
08-24-2008, 02:03 PM
How do I determine the paragraph that includes a particular bookmark? The bookmark's VBA-defined parent object appears to be the active document.

I know the bookmark name and the brute force workaround would be to sweep through all paras in the doc until I find the para with the right bookmark.

Thanks

TonyJollans
08-24-2008, 03:13 PM
This will give you a reference to it:
ActiveDocument.Bookmarks("name").Range.Paragraphs(1)

MWE
08-24-2008, 04:09 PM
This will give you a reference to it:
ActiveDocument.Bookmarks("name").Range.Paragraphs(1)thanks, this is just what I needed. Seems a bit backwards, but ...