Hi, I would greatly appreciate if you could be little more specific. I need
to explain this to someone else.
Thanks in anticipation,
Keyur
Hi Keyur,
Check out this link,
http://blogs.3sharp.com/Blog/davidg/archive/2004/12/17/183.aspx, should able
to get you started.
Hope this help.
> Hi, I would greatly appreciate if you could be little more specific. I
> need
[quoted text clipped - 30 lines]
>> > Thanks,
>> > Keyur Shah
Tim Larson - 13 Aug 2005 02:48 GMT
This is possible.
1) Add a button to your IP form.
2) Add managed code to open a word application object.
Private wordApp As Microsoft.Office.Interop.Word.Application
Private wordDoc As Microsoft.Office.Interop.Word.Document
<InfoPathEventHandler(MatchPath:="launch_Word",
EventType:=InfoPathEventType.OnClick)> _
Public Sub launch_Word(ByVal e As DocActionEvent)
'save file file so it can be opened by Word. Cannot have it open in IP and
Word 'simulataneously
thisXDocument.SaveAs(pathway + thisFilename + ".xml")
'save file again IP but in another name
thisXDocument.SaveAs(pathway + thisFilename + DOVString + ".xml")
Try
wordDoc = wordApp.Documents.Open(pathway + thisFilename +
".xml")
Catch ex As Exception
'so you don't get multipal wordapp objects open
wordApp = CType(CreateObject("Word.Application"),
Microsoft.Office.Interop.Word.Application)
wordDoc = wordApp.Documents.Open(pathway + thisFilename +
".xml")
End Try
wordDoc.SaveAs(pathway + "word files\" + thisFilename +
DOVString + ".doc")
wordDoc.Application.Visible = True
wordDoc.ActiveWindow.Activate()
end sub
3) word will open the xml file But you have to have: added the IP schema
(usually mySchema.xsd) to the Word thru the Tools menu drop down -> the
templates and add-ins as well your .xsl file that uses wordML to translate
the .xml file generated by IP. You add this .xsl file through the schema
library. Select mySchema then add solution and then browse to your .xsl file.
Lastly I know I had to get permissions as a trusted source for the managed
code to be opening Word. that is another topic and it is addressed elsewhere.
Hope this helps

Signature
Tim
> Hi Keyur,
>
[quoted text clipped - 38 lines]
> >> > Thanks,
> >> > Keyur Shah
K''''ur - 15 Aug 2005 15:57 GMT
Thanks a lot to all of you. I will try with all this different options, and
might have more questions. hopefully not.
Thanks again,
Keyur
> This is possible.
> 1) Add a button to your IP form.
[quoted text clipped - 79 lines]
> > >> > Thanks,
> > >> > Keyur Shah
Ok, here is a bit more about Word and InfoPath compatibility.
Ok, let's start from the beginning, the InfoPath Form, is an xslt template
that receives an XML file and generates an HTML file.
The InfoPath product, is Internet Explorer enhanced, redesigned to view
these html files the way you see them in the product (using mshtml.dll).
Microsoft Word is a document processing product; it has some internal
presentation language to describe how the document looks like.
Microsoft created an XML implementation of this language, and now it is
called Word ML, and there is an internal hidden converter from Word ML to
the internal document language of Word (inside the product itself).
In other words, when you double click the WordML file, an internal
conversion is happening immediately from Word ML to whatever that product
uses.
Now about compatibility.
InfoPath stores the data of the rich text boxes as XHTML, Microsoft WordML
has no clue of how to display XHTML, Microsoft Word itself has a basic idea,
but not able to do that correctly either.
In other words, if you build the WordML file manually, and inject the XHTML
inside, Word won't be able to display it.
And if you call word directly (using the word object module), and use it to
transform the XHTML (the contents of the rich text box), you will get a
crappie transformation, missing contents, or improperly aligned tables,
or ... you name it, they have it.
In other words, the nicely formatted contents of InfoPath, are not nicely
formatted in Word after the transformation (if you get it to work).
And that was just about one type of fields only
Now take this to the rest of the product, and you will find a different
problem with each filed, either minor, or major.
I just don't understand the product managers of Office when they talk about
computability of the office products, and how can you use InfoPath and Word
together, yeh right, good luck :-)
> Hi, I would greatly appreciate if you could be little more specific. I
> need
[quoted text clipped - 30 lines]
>> > Thanks,
>> > Keyur Shah