We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Find and Replace Shapes

Hey,

is there any way to find and replace shapes of an existing document?

best reguards,

sean roddis

1 Reply

SK Sathish K Syncfusion Team May 21, 2014 03:18 PM UTC

Hi Sean,

 

Thank you for your interest in Syncfusion products.

 

As per the MS Word behaviour, DocIO doesn’t have any API to find and replace the auto shapes present in a word document. Alternatively we can find the auto shapes present in the word document based on the “Title” information of the shape and replace the shape with new shape which has the desired “Title”. We have prepared a sample to illustrate the same. In this sample we iterate the paragraph items and find shapes based on the given “Title”. Then we remove the shape from the paragraph which has the given title and inserts a new shape in the place of old shape. Please do find sample from below link.

 

Sample link:

http://www.syncfusion.com/downloads/support/directtrac/125316/Sample1333789330.zip

 

Note:

This workaround is applicable for the “docx” format documents only since DocIO provides only preservation support for Auto shapes in Binary format document (.doc).

 

Please let us know if you have any other questions.

 

Regards,

Sathish


Loader.
Live Chat Icon For mobile
Up arrow icon