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

Insert Image at a particular location in a document

Hi there!

This is admittedly a simple and stupid question but I've not been able to figure it out.

How can I replace a keyword by an image e.g. "C:\sample.jpg"?  The keyword appears only once in my document.  I have seen examples which explain how to add an image in a new section or at the end of a document.  However, I have not been successful in determining how to add an image at a specific location in a document.

Thanks!

1 Reply

DB Dilli Babu Nandha Gopal Syncfusion Team November 12, 2018 11:01 AM UTC

Hi Michel,  

Thank you for contacting Syncfusion support.  

We have prepared a sample as your requirement which can be downloaded from the following link.  

The following thing has been done in the sample.  
1.   Created a template document Input.docx with replace text” Replace” using Microsoft Word application.  
2.   Opened the template document and created TextBodyPart instance with WPicture item(by loading an image from folder location) using Essential DocIO.  
3.   Replace the text” Replace” with WPicture instance. 
4.   Saved the document.  

To know more about these manipulations, kindly refer the following link.  

Please let us know if you have any questions.  

Regards, 
Dilli babu. 


Loader.
Live Chat Icon For mobile
Up arrow icon