Printing Infopath XML from a V.B.Net App

S

Sandy

I'm trying to find out how to call Infopath from within a V.B.Net app, and
have it print a given Infopath .xml document. Can anyone help? Thanks.
 
S

Scott L. Heim [MSFT]

Hi Sandy,

Here is sample VB.NET code to print an existing InfoPath XML file:

Dim appIP As New InfoPath.Application
Dim strDoc As String

strDoc = "C:\frmPrintTest.xml"
appIP.XDocuments.Open(strDoc)
appIP.Windows(0).XDocument.PrintOut()
appIP = Nothing

I hope this helps!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Scott L. Heim [MSFT]

Hi Sandy,

That's great = thank you for the update!

Best regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

Boris Kleynbok

I am trying to do the same thing only to "Bath print" from .NET
How do I instantiate and work InfoPath.Application object in .NET and not
inside InfoPath ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top