Got more questions? Find advice on: SQL | XML | Regular Expressions | Windows
in Search
Welcome to AspAdvice Sign in | Join | Help

TX Text Control

News and interesting articles about the word processing component TX Text Control.

How to merge images into MS Word templates

Merging images is required in many templates: Company logos in invoices, pictures of employees in HR reports or signature images in letters. These images can't be part of the template as they have to be merged dynamically.

With the release of TX Text Control .NET Server 16.0, the MailMerge class comes with this feature out of the box. It is possible to pass an image path with the merge data or an image can be added dynamically in the new ImageFieldMerged event.

Image fields are regular merge fields with a special format:

'image:' is the identifier followed by the name of this field. In this sample, all image fields are merged with the same image in the ImageFieldMerged event:

void mailMerge_ImageFieldMerged(object sender,
TXTextControl.DocumentServer.MailMerge.ImageFieldMergedEventArgs e)
{
if (pictureBox1.Image == null)
return;

// add the image from the PictureBox
TXTextControl.Image img = new TXTextControl.Image(pictureBox1.Image);
e.Image = img;
}

Download the new sample in our source code library that shows this new feature in detail:

How to merge images into MS Word templates


About TX Text Control:

TX Text Control was originally released in 1991, since then more than 40,000 copies have been sold. Starting off as a single, small DLL, TX Text Control has made its way through 16-bit DLL and VBX versions to today‘s Enterprise edition with its .NET and ActiveX components. The recent addition to the family, TX Text Control .NET Server, offers all of TX Text Control advanced word processing functionality in an easy-to-use server-side .NET component. Customers benefit from these years of experience, large user base, and at the same time, appreciate developing with a mature, reliable product.

Contact Informations:

support@textcontrol.com

North & South America:
Phone: +1 704-370-0110
Phone: +1 877-462-4772 (toll free)

Europe:
Phone: +49 (0)421 42 70 67 10

Asia Pacific:
Phone: +886 2-2797-8508
Sponsor
Published Tuesday, January 25, 2011 7:01 AM by Christopher Krause

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Enter the code you see below

Submit

This Blog

Syndication