Generate a word document and dynamic form - InfoPath Dev
in

InfoPath Dev

Generate a word document and dynamic form

Last post 09-12-2006 02:30 PM by trufooser. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-11-2006 04:20 AM

    • shineofleo
    • Not Ranked
    • Joined on 09-11-2006
    • United Kingdom
    • Posts 2

    Generate a word document and dynamic form

    Hi,

    I found the infopath is the potential solution to my goal, but still I have no idea how to do it... or is it able to do it... Please forgive me if I asked some old questions. I did searched a lot, but since the words may be different, I can not get exactly what I want...

    Generally I have two questions.

    -The first one is: (How) can I generate a word document from a submitted infopath form?

    I have many word templates (which is quite complicated, many pages, and there are pictures in them), and lots of empty fields waiting to be filled. What I want is that let the user fill the infopath form, and press the 'submit' button in the end, and the final word documents can be generated 'magically'.

    I think technically this is not hard for the clever computer, but how can I do it? Because there are multiple word documents have to be generated...

    -The second question is about the dynamic interactivity.

    I have a much more complicated situation than a simple 'one-page-still' form. In short, I have a big(or huge) tree structure expressing the series of product components. The user have to choose the detail area of the products, and then different conditions, arguments, finally the form can generate a proper 'configuration' for them. Obviously, all the properties of nodes will be recorded, and fill to the word documents as described in question 1.

    Also, I have to check the price of each components via another Excel table, and then put them into the final word document, too.

    As the user is answering the questions in the form, they are actually walking down in the path of the tree(there is no loop in the tree). As they can see, the form will change if they pick different options. For example the food area and papermaking are will provide different product, with different parameters of the products.

    I have checked that conditional fomatting is a possible solution. But since the tree map is so huge, is it a proper way to this? I also found that some XML data source may be a solution, but what is the detail? And how can i change the form dynamicly given a tree map?


    Thank you for you reading through to here, I would be so appreciated if you could provide some information on these two questions...



    Leon
  • 09-11-2006 09:27 AM In reply to

    Re: Generate a word document and dynamic form

    Hi Leon and welcome to the InfoPathDev forums

    Converting to word is not as easy as it would seem as there is no built in convertor. There is a tool in the SDK that you can use to do this, it requires setting up a word document and mapping in all the XML into the Word doc. It can be done but it may take a lot of work for a form as big as the one it sounds like you are making. Here is a link to the word conversion tool:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ipsdk/html/ipsdkUsingTheInfoPathToWordWizard_HV01119047.asp

    And how big are the tress you are talking about for the data in the document? There may actually be several ways to do what you need to do. What you need is possible to do with InfoPath if I am understanding your form correctly. I would think that setting up and testing the form with so many possible options is going to be very important to making sure this forms works correctly in the end. You may also find that using Access rather than an XML datasource may be easier to manage.

  • 09-12-2006 12:37 AM In reply to

    • shineofleo
    • Not Ranked
    • Joined on 09-11-2006
    • United Kingdom
    • Posts 2

    Re: Generate a word document and dynamic form

    Thank you for your reply Ted, which is very informative.

    As for the word template, it only need short input from the form, such as a length of the product '56mm', or name of some content 'moisture'. The word template is big, with all the descriptions, but only these basic words are needed through the form.

    The tree sturcture is similar to below chart



    on each node, user chooses on path down to another node, until the final leaf node. In other words, the infopath should ask the user a question, while when the user moves down along the path, the next question maybe different from time to time, because user picks different answers (paths) each time.

    And this is the meaning of 'dynamic' i think. Can I say this is a kind of decision tree, but we have already had the tree structure, and only have to follow the existing rules.

    All of these are not very hard, but i am wondering is there are formal way to design it... since it would take a long time to do this in a pure programming environment...
  • 09-12-2006 02:30 PM In reply to

    Re: Generate a word document and dynamic form

    I just posted a nifty snippet of code a wrote today. Its a button that opens outputs field contents to a text file and then opens that text file. I'm pretty sure it could be easily modified to put it into a Word file.

    link is here:

    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=3314
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.