How to demonstrate the problem:
After opening this document, stay with the cursor on the beginning of the document.
Launch now the Macro1 included in this document.
This macro simply writes a few lines into the document. It is a simple recorded macro!
The second line is formatted in 10 point, and a word in this line is bold. All this is done by direct formatting during writting.
The third line is written in the same way, but it is formatted as underlined, not in 10 point.
Now launch the Macro2.
This macro simply adds text tags <s> … </s> at the beginning and at the end of the text formatted in 10 point, and <u> … </u> for the underlined text.
However, you see:
– The word which was bold has lost this format in lines 2 and 3!
– The underlined text in line 4 was not found!
My screenshoots:
Before replacing:
After replacing: