8
Views
1
Comments
[MSWordUtils] - Formatting a replacement Bookmark text - Solution

Hey there!

I was faced with this task mentioned in the subject and noticed that with this specific component there seemed to be no straightforward solution, so I wanted to share mine in hopes of helping others facing the same challenge.

Given a task of applying certain texts within a word document, and resorting to the bookmark replace function within MSWordUtils, one notices that the word font format won't be applied, i.e. the surrounding text will be different to the replaced one.

In order to solve this, one needs only to create a new Style that matches the needed format, and apply it to the area surrounding the bookmark.

This will force that format upon the inserted text and solve any formatting issues that may be faced!


Hope this helps as I have seen people with the same issue using this component.

2023-10-16 05-50-48
Shingo Lam

great, thanks for your contribution

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.