infopath 2010, which reference need to add for XDocument.PrintOut(); - InfoPath Dev
in

InfoPath Dev

infopath 2010, which reference need to add for XDocument.PrintOut();

Last post 10-15-2014 07:24 AM by Wheels. 13 replies.
Page 1 of 1 (14 items)
Sort Posts: Previous Next
  • 11-01-2011 11:51 AM

    infopath 2010, which reference need to add for XDocument.PrintOut();

    Hi,

    I already reference the infopath and added :

    using Microsoft.Office.Interop.InfoPath;

    but I can not find printout() under XDocument.  anyone knows why?

    Thanks,

    Snow
  • 11-02-2011 10:02 AM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    any one knows why? or what code should put in the print button in infopath 2010.

     thanks a lot!

    Snow
  • 11-02-2011 10:31 AM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    For IP 2010, looks like you just need:

     this.Print(true);
    or
    this.Print(false);

    depending on if you want to show the print dialog - from MSDN.

    Hilary Stoupa

  • 11-02-2011 04:54 PM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    Hi,

    just an additional note to Hilary´s answer. this.Print() is not available for browser-based form cause this method prints to a local device. It doesn't print your browser form.

    Regards,

    Karsten
    Filed under:
  • 11-02-2011 05:01 PM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    Thanks, Karsten, for adding that - I should have mentioned it specifically. It can be kind of confusing, especially for those not accustomed to reading MSDN documentation.

    Hilary Stoupa

  • 11-04-2011 12:10 PM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    Thanks Karsten and Hilary,

    there is no print under this, I mean after type this. no print() in the list...

    what do you mean 'browser-based form' ?
    The form I built does not publish to any website... it's a plain infoPath form and try add a print button when fill out data in the infoPath filler.

    Thank you!

    Snow
  • 11-04-2011 12:12 PM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    Thanks Karsten and Hilary,

    there is no print under this, I mean after type this. no print() in the list...

    what do you mean 'browser-based form' ?
    The form I built does not publish to any website... it's a plain infoPath form , I try to add a print button so the user can just click print button after they fill out data in the infoPath filler.

    Thank you!

    Snow
  • 11-04-2011 12:16 PM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    If you go to File->Form Options->Compatibility, what does it show for the Form type?  What programming language and year are selected in File->Form Options->Programming?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-07-2011 05:31 AM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    Thank you Jimmy,

    the Programming Language is C#.  :)

    The Form type is Web Browser form... it's the default one, I didn't pick it.
    the form linked to a webServices to connect the database. and we will fill out the form through filler. what kind of form type do you think I pick?  what's different between the Web Browser form  and InfoPath filler form?

     Thank you!

     

    Snow
  • 11-07-2011 07:04 AM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    If you change the form type to a non-browser form in those properties, you should be able to use the print functionality. 

    In future, you can create a non-browser form by selecting one of the Blank Form (InfoPath Filler) options when you select a template type.  If you select just Blank Form it will be set up for browser compatibility.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-07-2011 09:22 AM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    Thanks Jimmy,

    U are right!   :)

    After modified the form Type, this.print() shows up . but still can't see printOut() under xDocument.

    Thanks

    Snow
  • 11-07-2011 10:00 AM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    As Hilary pointed out, XDocument is only available in the 2003 object model.  In 2007 and 2010, you would use this.Print();

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 11-18-2011 08:50 AM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    this.print(); will print the form directly. is there any way can let user do print preview first? :)

    Thank you!

    Snow
  • 10-15-2014 07:24 AM In reply to

    Re: infopath 2010, which reference need to add for XDocument.PrintOut();

    Good morning.

    I found this JScript online: document.printOut(outputFileName : "C:\\temp\\fileName.tif", printToFile : true); at http://stackoverflow.com/questions/7854205/suppress-print-dialog-when-printing-to-microsoft-document-image-writer-from-orac.

    I am looking for a C# equivalent in a InfoPath 2007. this.Print() works, but how would you save it as a .tif and name the file?

    WHEELS

     

Page 1 of 1 (14 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.