Use Button to Print

M

mdsmitty

I am new to InfoPath and not experienced with writing code via JScript or
VBScript. What I am tring to do is use a button to print to a specific
printer. I know that using the Button Properties there is a place to enter
custom code but I am not sure the best way to accomplish this action?

Any suggestions would be greatly appreciated.

Thanks in advance.
 
S

Scott L. Heim [MSFT]

Hi,

Are you trying to specify the printer at "runtime" (i.e. dynamically where
this changes) or you simply want to be able to specify a different printer
to use that will remain constant?

Thanks,

Scott L. Heim
Microsoft Developer Support

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

mdsmitty

When the user finishes filling in the form, I want them to be able to click
the "Print" button at the bottom of the page which will print the form to a
specific printer (same printer every time).
 
S

Scott L. Heim [MSFT]

Hi,

The following steps should provide the functionality you need:

1) Open your InfoPath solution in Design View
2) Select the "View" that is going to be printed
3) Click the "View Properties" button
4) Select the "Page Setup" tab
5) Select the printer you want to use as the default printer
6) Click OK and then save your InfoPath solution

Now when the print button is clicked it will automatically be printed to
the printer you specified.

I hope this helps!

Scott L. Heim
Microsoft Developer Support

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

mdsmitty

Thanks Scott, this should work. I had other thoughts in mind but as most
people do, you overlook the simplest way.

Thanks again.
 

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