Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / January 2007

Tip: Looking for answers? Try searching our database.

exporting form data to word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rhonda - 03 Nov 2006 22:49 GMT
Hi all,

I have a rather unique request from on of our departments and I have no idea
of how to go about implementing it.  Here is a scenario.

When one of our sales guys makes a sale, they fill out an InfoPath form that
is routed to Finance that gives them all the information they need to enter
the new customer into SAP and send an invoice.  The sales person will also
frenquently fill out a word document that is routed to our Marketing site
that can be used for case studies etc.  A lot of the data is the same in the
Word doc as it is in the InfoPath form (ie. Customer name, address, products
purchased, etc.).  What the users would like to do is at the time they are
filling out the InfoPath form, check a check box that says something like
"Create Marketing Doc", once they submit the form, the Word doc (which is on
our Sharepoint site) would automatically open with as much of the data that
can be populated from the InfoPath form already entered. That way they don't
have to enter the data again in a different place.  The marketing team is
insisting on using this already formatted Word doc so we are pretty much tied
to using it.  Does anyone know how this can be done?

Code samples and detailed explanations would be greatly appreciated since I
am fairly new to InfoPath.

Thanks a ton in advance,
S.Y.M. Wong-A-Ton - 03 Nov 2006 23:14 GMT
I recently wrote an article about exporting InfoPath forms to Word. See
http://enterprise-solutions.swits.net/infopath2003/article.php?t=convert-infopat
h-form-into-word-doc-send-email-attachment-outlook&c=infopath2003


You could modify this code to exclude the email part, just print the Word
document, and instruct users to publish their Word document to the SharePoint
library when they are done. Or you could write code to automatically publish
the generated Word document to the SPS library. While I have never tried the
latter, it should be doable.
---
S.Y.M. Wong-A-Ton

> Hi all,
>
[quoted text clipped - 20 lines]
>
> Thanks a ton in advance,
Rhonda - 04 Nov 2006 00:29 GMT
That appears to be taking the InfoPath and importing the form and styles
exactly as it is into Word.  I don't want the full form in Word.  I just need
to populate an existing Word Template with bits of the data from the form.

Thanks anyway,

> I recently wrote an article about exporting InfoPath forms to Word. See
> http://enterprise-solutions.swits.net/infopath2003/article.php?t=convert-infopat
h-form-into-word-doc-send-email-attachment-outlook&c=infopath2003

[quoted text clipped - 31 lines]
> >
> > Thanks a ton in advance,
TomTom - 06 Nov 2006 13:58 GMT
Facing the same problem.
Got a infopath 2007 form.
And got a Word template.
But how to assign the xml data to the word form ???

> That appears to be taking the InfoPath and importing the form and styles
> exactly as it is into Word.  I don't want the full form in Word.  I just need
[quoted text clipped - 37 lines]
> > >
> > > Thanks a ton in advance,
S.Y.M. Wong-A-Ton - 12 Nov 2006 02:25 GMT
Actually, it is not importing the form; the data within the form is being
transformed into a WordML document. What the XSL stylesheet does for you is
loop through all the nodes within the InfoPath form and transform them so
that they conform to the Word document you want.

If you want only bits of data from the form, you can build in logic in the
XSL stylesheet to only use certain fields from the InfoPath form based on
certain criteria, or write your own code in InfoPath to loop through all the
fields in the InfoPath form and construct the XML for your Word document. The
latter is much more labour intensive.

Another option is to use the new OpenXML file format of Office 2007 to
replace certain parts of a docx document with information from InfoPath.
---
S.Y.M. Wong-A-Ton

> That appears to be taking the InfoPath and importing the form and styles
> exactly as it is into Word.  I don't want the full form in Word.  I just need
[quoted text clipped - 37 lines]
> > >
> > > Thanks a ton in advance,
elin - 29 Dec 2006 04:43 GMT
Hi S.Y.M. Wong-A-Ton, I am struggling with the same problem and I am using
Office 2007, can you give me more information on how to replace certain parts
of a docx document with information from InfoPath?

Thanks,
Elaine

> Actually, it is not importing the form; the data within the form is being
> transformed into a WordML document. What the XSL stylesheet does for you is
[quoted text clipped - 53 lines]
> > > >
> > > > Thanks a ton in advance,
S.Y.M. Wong-A-Ton - 01 Jan 2007 02:23 GMT
Hi Elaine,

Sure thing!

First things first: You need to read up on the new OpenXML format that Word
uses. Use these links:
http://msdn2.microsoft.com/en-us/library/ms771890.aspx
http://msdn.microsoft.com/msdnmag/issues/06/11/BasicInstincts/default.aspx
http://blogs.msdn.com/brian_jones/

Then, if you are using InfoPath 2003 and Word 2007, you'll need Visual
Studio 2005, the InfoPath 2003 Toolkit for Visual Studio 2005, and the .NET
framework 3.0 runtime to be able to manipulate docx files from within
InfoPath.

Unfortunately, I do not have an InfoPath 2003 / Word 2007 environment to
test things out on, so I've created a solution for InfoPath 2007 / Word 2007
environments. Note: The latter environment requires Visual Studio 2005, VSTO
2005 SE which contains a template to create InfoPath 2007 code behind forms,
and the .NET Framework 3.0 runtime to manipulate docx files from within
InfoPath.

The solution I've created can be found here:
http://enterprise-solutions.swits.net/infopath2007/article.php?t=convert-infopat
h-form-into-word-2007-document-xslt-c-sharp&c=infopath2007


Good luck!
---
S.Y.M. Wong-A-Ton

> Hi S.Y.M. Wong-A-Ton, I am struggling with the same problem and I am using
> Office 2007, can you give me more information on how to replace certain parts
[quoted text clipped - 60 lines]
> > > > >
> > > > > Thanks a ton in advance,
elin - 01 Jan 2007 21:00 GMT
Happy New Year, S.Y.M Wong-A-Ton. Wow, thanks, this is such a great new year
gift!
While I was waiting for your reply, I viewed a webcast called "Creating and
Deploying Custom Document Information Panels for Word 2007,
http://blogs.msdn.com/infopath/archive/2006/11/06/data-binding-between-document-
information-panel-and-word-document.aspx
"
which help me understand the relationship between InfoPath 2007 and Word
2007. I am posting my InfoPath form on Sharepoint 2007 for users to fill out.
My goal is to auto create a Word document once the user submit the form with
the information that is on the form. But I don't know how to bring up the
Word template and populate the fields from InfoPath 2007. Do you think
binding the data between DIP and Word is a better way to go since I am using
SharePoint 2007?

Thanks,
Elaine    

> Hi Elaine,
>
[quoted text clipped - 89 lines]
> > > > > >
> > > > > > Thanks a ton in advance,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.