Exporting infopath form data (as XML) to Word 2003 - InfoPath Dev
in

InfoPath Dev

Exporting infopath form data (as XML) to Word 2003

Last post 10-03-2008 06:05 AM by chandrakanth. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 03-08-2005 12:11 PM

    • b_man
    • Not Ranked
    • Joined on 03-08-2005
    • Canada
    • Posts 4

    Exporting infopath form data (as XML) to Word 2003

    I've recently taken on some infopath development.
    The solution involves creating a button on a infopath form.
    Once clicked, a new MS Word 2003 doc opens and is populated with infopath form data.

    I'm most likely going to be using C# for doing this, but I may do this in java script.

    For my situation I plan to take the form data as XML and transform it using an XSLT. The next step is to open a word doc and populate it with the data from Infopath.

    So I need to know the code for...
    - opening a new word document
    - getting the InfoPath form data as XML
    - populate the Word doc with Infopath data

    Also, is it possible to pass the XML file directly into Word and process it inside Word
    using XSLT (a.k.a Word 2003 XML data views) ... all from InfoPath.
    Just wondering for future Word 2003 XML solutions.
  • 03-09-2005 12:52 AM In reply to

    Re: Exporting infopath form data (as XML) to Word 2003

    Hi B_man,
    Welcome to the board! You can definitely do the 3 bullets, but I don't have any random snippets hanging around for copy/paste. You can also call code to do an XSL apply before sending Word the xml, but why use Word?
    Patrick
    Patrick Halstead
    Project Manager at Qdabra
  • 03-09-2005 04:42 AM In reply to

    • b_man
    • Not Ranked
    • Joined on 03-08-2005
    • Canada
    • Posts 4

    Re: Exporting infopath form data (as XML) to Word 2003

    The reason for passing XML into Word is so that I can use the XML functionality later (ex. develop different XSLT's that can be applied later, reuse data from Word, etc.).

    You don't happen to any other sites or resources that give C# coding examples?
  • 03-09-2005 10:29 AM In reply to

    Re: Exporting infopath form data (as XML) to Word 2003

    Here's some sample code I pulled off the newsgroup. I haven't tried it myself. It's JScript code.

    var wdApp;
    wdApp = new ActiveXObject("Word.Application");
    wdApp.Visible = true;
    wdApp.WindowState = 1;
    wdApp.Documents.Open("C:\\Documents and Settings\\username\\Desktop\\test.doc");


    Greg Collins [InfoPath MVP]
  • 05-24-2005 01:31 PM In reply to

    • bala
    • Not Ranked
    • Joined on 05-24-2005
    • Posts 1

    Re: Exporting infopath form data (as XML) to Word 2003

    Hi b_man,
    I am evaluating Infopath for our new project and one of the features we are want in that are the same as you have mentioned. Will it be possible for you to let me know how you implemented it.

    That will be a great help.

    Thanks in advance.

    Bala.
  • 10-03-2008 06:05 AM In reply to

    Re: Exporting infopath form data (as XML) to Word 2003

    Hi,

    Recently I implemented the functionality of “Exporting InfoPath to Word” and it works very well in most of the scenarios. I am giving some of the links that helps you to implement the above functionality.

    ·         This link is useful for generating Xslt for an InfoPath form for "Exporting InfoPath to word".

    http://enterprise-solutions.ikreate.nl/infopath2003/convert-infopath-form-into-word-doc-send-email-attachment-outlook.htm

    ·         This link is useful for displaying InfoPath rich text box data into the word document.

    http://blogs.msdn.com/infopath/archive/2007/03/19/transforming-infopath-rich-text-to-word.aspx.

    ·         By using the above two links you can able to get the Xslt for an InfoPath form for “Exporting InfoPath to word”. After getting the Xslt use the transformation functions in the code for transforming the "InfoPath to Word".

     

    Chandrakanth/GGKTech
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.