I am trying to figure out how to copy and paste a bookmark in the same document.
I have some hidden paragraphs that are bookmarked selections and I want to copy one and paste
one to another location within the same document. The newly pasted text needs to be inside a
new bookmark (created programatically) that I can find later and update or delete as necessary.
Pseudo code would be something like:
Find existing bookmarked selection
Copy bookmarked selection
Jump to another location in the document
Paste the selection inside a new bookmark (with formatting) so it can be found and deleted later if necessary
Where I keep falling down is around pasting the formatted text inside a new bookmark that doesn't either
1. End up corresponding to an existing bookmark
2. Replacing an existing bookmark
3 Being just outside of the bookmark.
Hope the above makes sense and any help would be much appreciated