External automation between InfoPath and C# .NET - InfoPath Dev
in

InfoPath Dev

External automation between InfoPath and C# .NET

Last post 03-16-2006 02:08 PM by johngidd. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-06-2006 09:15 AM

    External automation between InfoPath and C# .NET

    I need a way to Open InfoPath 2003, print the document and close application window through c# application, and not using managed code.

    Sample code that I was given:

    using Microsoft.Office.Interop.InfoPath;

    Applications App = new Application();
    XDocument xdoc = App.XDocuments.Open("C:\test.xml", 0);
    xdoc.PrintOut();
    App.XDocuments.Close(0);
    App.Quit();

    Does not compile. Most likely I need some references.

    Please let me know what my options are

    With Regards,

    Boris Kleynbok
  • 03-08-2006 12:37 AM In reply to

    Re: External automation between InfoPath and C# .NET

    Hi Boris,
    Looks like that is managed code. Did you create a VS project and try to compile? "Compile" usually means code and not script although .NET is actually JITted and interpreted (i.e. compiled to an intermediate form). Our book covers creating .NET projects. If you really don't want to use managed code, you can do the above with a full trust form in jscript but you'll need to get the right code for that.
    Patrick Halstead
    Project Manager at Qdabra
  • 03-16-2006 02:08 PM In reply to

    Re: External automation between InfoPath and C# .NET

    This thread has a few of the missing pieces, might be helpful.

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