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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

replace a string with an image

Thread ID:

Created:

Updated:

Platform:

Replies:

48410 Aug 26,2006 08:06 AM UTC Jul 18,2018 11:37 AM UTC WinForms 7
loading
Tags: DocIO
Piermaria Saglietto
Asked On August 26, 2006 08:06 AM UTC

Hi,how can i replace in a document all the string [LOGO] with an image/picture ?

Thanks
Piermaria

Piermaria Saglietto
Replied On August 26, 2006 08:49 AM UTC

... or pheraph a better question is:
can i create a Merge Field with DOC IO ?
Thanks
Piermaria

Administrator [Syncfusion]
Replied On August 28, 2006 04:34 PM UTC

Hi Piermaria,

Sorry for delay in getting back to you.

Currently, it is not possible to search a particular place holder text from template document and replace it by image/picture. I have added this as a feature request with our development team. You can track the live status of this feature here,

Feature Request #1028 - Finding a particular place holder and replace it with document elements

Sorry for the inconvenience.

Best regards,
Prabhu.


>Hi,how can i replace in a document all the string [LOGO] with an image/picture ?

Thanks
Piermaria

Administrator [Syncfusion]
Replied On August 28, 2006 04:54 PM UTC

Hi Piermaria,

Yes, it is possible to create a Merge Fields with DocIO. I have created a small sample to illustrate this feature. I have attached the sample. Could you please refer the sample and let me know if you need any other assist.

Best regards,
Prabhu.


>... or pheraph a better question is:
can i create a Merge Field with DOC IO ?
Thanks
Piermaria

Inserting_MergeFields.zip

Piermaria Saglietto
Replied On August 30, 2006 09:18 AM UTC

Hi Prabhu,
your example is ok.
But now can i replace all strings [LOGO] in a document with a MailMergeFiled called <> ?

Thanks in advance

Piermaria

Administrator [Syncfusion]
Replied On August 30, 2006 11:17 PM UTC

Hi Piermaria,

Currently, it is not possible to replace a placeholder by Merge fields [ Paragraph items ]. However, our developers are working with this feature. I will update you once the feature gets implemented.

Sorry for the inconvenience.

Kind regards,
Prabhu

Eric Rosenblum
Replied On July 17, 2018 10:01 PM UTC

can you replace the source of an existing image with a different image? like replace logo1.png with logo2.png?

Mohanaselvam  Jothi [Syncfusion]
Replied On July 18, 2018 11:37 AM UTC

Hi Eric,

Thank you for your update.

We suggest you to use
LoadImage API of DocIO to replace existing image in the Word document. To identify the existing image in the Word document, we suggest you to set title for the image in the Word document using Microsoft Word application and then replace with new image using DocIO based on that title.
Please refer the below screenshot to set title for image in the Word document:
Right click on image -> Format Picture.
 
 
 
 

For your reference, we have prepared a sample application to get the pictures in Word document and replace the image based on the title of picture.

Please find the sample from the below link and let us know if this helps you:
http://www.syncfusion.com/downloads/support/forum/48410/ze/GenerateWord-1845742562.zip

In this sample we have done the following things:
  1. Loads existing Word document using DocIO.
  2.  Iterates into document elements and get the pictures.
  3. Replaces image based on the
Title property of WPicture.
  4. Saves the Word document.

Please let us know if you have any other questions.


Regards,
Mohanaselvam J
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;