Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.
Thu Nov 17, 2022 9:05 am
Formats of the template are overwritten.
Font (from "Aria" to "Time"), font color (from "blue" to "black") and font size (from 16 to 12) of the template are changed when the following command is issued:
string _name = "something";
bookmark.MoveToBookmark("Name");
window.ReplaceBookmarkContent(_name, false);
Software: Spire.Office for .NET V. 7.4
Is it required that I provide the font, font color and font size information each time I change the bookmark?
What can I do?
-

ProPotsdam
-
- Posts: 9
- Joined: Sun Nov 29, 2020 4:30 pm
Thu Nov 17, 2022 9:41 am
Hello,
Thanks for your inquiry.
For your requirement, you need to set the second parameter to "true" when calling the "ReplaceBookmarkContent" method. I put the code snippet below for your reference.
If you have any issue, just feel free to contact us.
- Code: Select all
string _name = "something";
bookmark.MoveToBookmark("Name");
window.ReplaceBookmarkContent(_name, true);
Sincerely
Abel
E-iceblue support team
-


Abel.He
-
- Posts: 1010
- Joined: Tue Mar 08, 2022 2:02 am
Thu Nov 17, 2022 10:29 am
Hello,
thanks for the tip!
Have just found out myself.
Thanks a lot!
-

ProPotsdam
-
- Posts: 9
- Joined: Sun Nov 29, 2020 4:30 pm
Fri Nov 18, 2022 1:49 am
Hello,
Thanks for your feedback.
I'm glad to hear that your issue has been solved.
If you have any other issue, just feel free to contact us.
Sincerely
Abel
E-iceblue support team
-


Abel.He
-
- Posts: 1010
- Joined: Tue Mar 08, 2022 2:02 am