Results 1 to 3 of 3

Thread: Server Side Mail Merge on Word Docx based Template, Remove Empty Lines

  1. #1
    Join Date
    Apr 2012
    Posts
    1

    Server Side Mail Merge on Word Docx based Template, Remove Empty Lines

    Hello,

    A little background on what I am trying to achieve. I am trying to generate documents on server side based on Microsoft Mail Merge templates that has "MERGEFIELD". I think TX Text Control can handle this using TXDocumentServer Mail Merge object and TXTextControl.Server assamblies. What I am stuck on is, after I run Mail Merge, the MERGEFIELDS that has empty values stays as blank lines on a merged document. Is there anyway to remove those fields?

    I think there is a way for me to parse out all the MergeFields on a given word template and examine whether those fields has trailing CRLF in them and if they do, remove those CRLF if the value to be merged into the MergeField is empty. However, I am not able to find any existing sample in the forum or on TXTextControl site. Can anyone point me in the right direction?

    Thanks in advance.

  2. #2
    Join Date
    Jul 2012
    Posts
    1

    Re: Server Side Mail Merge on Word Docx based Template, Remove Empty Lines

    Hello Daniel

    I am attempting this same operation and am VERY new to the tool suite.
    I have a serverside (asp.net) .dot Word template that does a mail merge? to create invoices.
    Is this similar to your process?
    Any recommedations on how to get started with this?
    sample code perhaps?

    MANY THANKS

  3. #3
    Join Date
    Sep 2004
    Location
    Bremen, Germany
    Posts
    5,897

    Re: Server Side Mail Merge on Word Docx based Template, Remove Empty Lines

    Hey Don,
    You may want to take a look at our video tutorial to get an idea how to do it: http://www.textcontrol.com/en_US/blog/archive/20120803/
    Next, I suggest to go through our manual and samples, which are installed on your PC with TX Text Control .NET
    http://www.textcontrol.com/en_US/sup..._mailmerge.htm
    Regards,
    Gunnar Giffey, TX Text Control
    [Forum Administrator]

Similar Threads

  1. word mail merge file need to convert it to TX Template
    By emil.hlucky in forum TX Text Control ActiveX Server
    Replies: 2
    Last Post: May 20, 2008, 16:59:21
  2. How to create a template for mail merge?
    By yuli in forum TX Text Control .NET for Windows Forms
    Replies: 2
    Last Post: April 25, 2007, 21:17:11
  3. Mail Merge and Template
    By Dumas in forum TX Text Control .NET Server
    Replies: 4
    Last Post: August 9, 2006, 12:01:32
  4. server-side mail merge
    By Unregistered in forum TX Text Control .NET for Windows Forms
    Replies: 4
    Last Post: March 10, 2003, 15:19:44
  5. Remove Empty Lines For TextControl
    By bitpusher1010 in forum TX Text Control ActiveX
    Replies: 0
    Last Post: February 26, 2003, 00:27:16

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •