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.

Tue Feb 09, 2021 3:16 pm

Hi Team,

We need to replace certain items from the docx file based on the item type, so we need to get this done through Find and Replace option with "Special" field under More>> (Please refer the screenshot attached to get more info on the qeury)

Please help.

Thank you!!

pr20080798
 
Posts: 159
Joined: Wed Jan 20, 2021 1:15 pm

Wed Feb 10, 2021 6:30 am

Hello,

Thanks for your inquiry!

I am sorry that the Replace method of our Spire.Doc does not support the special formats like your screenshots. Could you please tell us what special formats do you need?We will implement the features.

Thanks in advance!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Wed Feb 10, 2021 4:30 pm

Hi Marcia,

The requirement is quite similar as that we have added in another post given below. We wanted to remove all section breaks through the special formats in Replace dialog.

https://www.e-iceblue.com/forum/remove-all-section-breaks-from-docx-t9937.html

We need to remove all section breaks from the docx file, but would like to hold the document in the memory and do other stuff (may be the parsing of the document post removing all section breaks). The response we received by you in that post is to remove all section breaks and store the document to another file (little concerned about writing it to new file and again start reading).

Let us know if this can be achievable.

Our target objective is to have only single section throughout the docx and which should contain all the other sections' body inside that.

pr20080798
 
Posts: 159
Joined: Wed Jan 20, 2021 1:15 pm

Thu Feb 11, 2021 1:39 pm

Hello,

Thanks for your feedback.
Sorry that Spire.Doc does not yet support finding the section break and removing it through the special formats like MS Word. If you want to keep only one section, you can only do it like the code provided by my colleague Marcia at present. In addition, the code she provided does not store the document to another, it operates directly on the original document object. You can continue your other operations after removing the sections.

Sincerely,
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Thu Feb 11, 2021 5:57 pm

Thanks a lot for the solution. We are able to merge the sections and parsing is also fine now. :)

pr20080798
 
Posts: 159
Joined: Wed Jan 20, 2021 1:15 pm

Fri Feb 12, 2021 2:24 am

Hi,

We are glad to hear that your issue has been resolved.
Feel free to contact us if you have any issues in the future.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3046
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc

cron