Coffeehouse Thread

9 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Form Letters

Back to Forum: Coffeehouse
  • User profile image
    TheJoe

    What would be a good solution for form letters?

    "Thank you A for visiting our bank B..."

    In the past I have used .NET with bookmarks in Word.docs and form fields on PDFs but, they both have speed issues IMO.

    I would like to use some combination of XML, HTML, and/or XHTML but not finding much in the way of a useable framework.

    Your Thoughts? 

  • User profile image
    kettch

    @TheJoe: How much customization do you need? We built a system that does form letters using SSRS. It seems to work pretty well. We also have some semi-form-letters that output to Word documents and get some additions that aren't automatable.

  • User profile image
    TheJoe

    @kettch: I would say that it would need to be configurable for different user at moderate level.

    To that end, a base file such as HTML, DOC, PDF, or ? that would serve as the basic outline of the form letter that is 'marked up' for static (Name, address, phone#, email, ect) and scaleable data such as an iventory list.

    The end user would have control over the base file to make changes as the see fit and the program (windows form C#) would handel the 'mark up' passing of data.

    I have used word in the past but would run into speed, file locking, and office version issues.  I don't want to force some one to buy a specific version of word to use my product.

    I have used PDFs in the past as well but, this approach tends to be hand-cuffed to third part controls and overly complicated.

    They ability to merge data from a XML file into a 'marked-up' HTML file would be great but the way I have found to do that is treating the files as if they were raw text files so there is no point there.

    These are just the raw basics I have thought up so far.

     

  • User profile image
    ZippyV

    The Office Open XML formats don't require Word to be installed since they are just a bunch of zipped xml files. In some cases you can treat the xml file as a text file and do a String.Replace to fill in the fields.

  • User profile image
    kettch

    @ZippyV: You should be able to use the Open XML SDK to get a little finer grained control, but the general idea should work.

  • User profile image
    JoshRoss
  • User profile image
    AndyC

    Another option would be to use XAML mark up and just get WPF to lay it out for you, which can be surprisingly effective and very flexible.

  • User profile image
    giovanni

    , TheJoe wrote

    What would be a good solution for form letters?

    "Thank you A for visiting our bank B..."

    In the past I have used .NET with bookmarks in Word.docs and form fields on PDFs but, they both have speed issues IMO.

    I would like to use some combination of XML, HTML, and/or XHTML but not finding much in the way of a useable framework.

    Your Thoughts? 

    Probably a side note (rant) and not an answer to your question, but Word should provide an out of the box solution to this kind of problems. With Open XML this should be very easy to implement anyway, but unfortunately the Quick Part button on the ribbon is anemic to say the least (the last time I created a letter template with a repeating Content Control, I had to install the Word Content Control Toolkit and do some mapping!).

    I hope the Word team read this and spends some time adding this kind of functionality instead of adding more picture effects...

  • User profile image
    TheJoe

    Been looking at pre-building html pages and using HtmlAgilityPack to fill out the form.  I think this will give me all the flexiblity of html and be much faster than .docx or .pdf.

    Anyone ever use HtmlAgilityPack before?

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.