Add print Button in Infopath form
To add print button in infopath form ...
1.Right click the print button ->Button Properties->Edit Form Code. It will open Visual Studio Tools for Applications (VSTA)
2. Add the following code for that print button.
PrintDocument pd = new PrintDocument();
pd.Print();
pd.Print();
3.Also add the following namespaces.
using System.Drawing;
using System.Drawing.Printing;
using System.Drawing.Printing;
NOTE:
This will not work in Browser enabled infopath forms
how/where do you add the namespaces you describe?
ReplyDeleteHi jasper mole,
ReplyDeleteIn the top... below the default namespaces..
Hmm not able to get this to work. For us non-programmers a glimpse of the final code work be really helpful.
ReplyDeleteNOTE: This only works on pre-InfoPath 2013. v2013 does not have the ability to natively add code w/o owning Visual Studio pro.
ReplyDelete