Quote:
Originally Posted by marceepoo
The Demo() macro did remove the preexisting bookmark "LastEntryThusFarMadeInTblOfExhibits", but did the macro did not create a new bookmark "LastEntryThusFarMadeInTblOfExhibits".
|
It does both in my testing.
Quote:
Originally Posted by marceepoo
Your Demo() macro contained a lot of code that I do not understand ... because I do not understand how ranges work, and I have never found a tutorial explaining ranges (and how to use them) that I could understand enough to be able to use ranges.
I think your code between the line: Do While .Find.Found and the line: If Not RngFnd Is Nothing Then .Bookmarks.Add Name:="LastEntryThusFarMadeInTblOfExhibits", Range:=RngFnd was intended to do the following:
1. Create something analogous to a "selection point" at the place in the document where the search found the text "[FULLNAME: PDF] ", and
2. Create the new bookmark "LastEntryThusFarMadeInTblOfExhibits" at that new "selection point"
... or something like that.
|
What happens when using Find is that the range spanned by Rng actually moves to the found range.
Quote:
Originally Posted by marceepoo
I would like the macro to insert the new bookmark "LastEntryThusFarMadeInTblOfExhibits" in column #1 on the first line of the next Heading 1 where the search found the text "[FULLNAME: PDF] " (i.e., the Heading 1 paragraph, where the search found the text "[FULLNAME: PDF] ", after the Heading 1 paragraph where the preexisting bookmark "LastEntryThusFarMadeInTblOfExhibits" had been, before it was deleted by the macro).
|
Well, that is rather different from what you previously described. I'll get back to you on that.