Hi,
I am looking for the beste way to search and replace within a bookmark. I would like to retrieve the contents of a bookmark and replace multiple words (if present). The replaced content is bookmark dependent, so I can't do a document wide find/replace.
[Your score for <scale> is <average>.]
[Your score for <scale> is <average>.]
If the above are two different bookmarks, the result could look like:
[Your score for depression is high.]
[Your score for stress is low.]
I am using bookmarks, because depending on business conditions, some bookmark text will be deleted all together.
I did not find a way to do Find and Replace in a TextBodyPart.
The only way I have found is to get the content of the bookmark as a WordDocument, then to the Find and Replace, but then I struggle to replace the contents of the bookmark with the processed WordDocument. It also does not sound as a very performant way, but I don't know that for sure.
Can you set me in the right direction?
Thanks
Pieter