Controlling printing with VBA

paulricot

New Member
Joined
Jun 15, 2005
Messages
5
I have been reading a number of websites dedicated to the "Sendkeys" method of controlling the printer from within Excel 2010. However, I can only get as far as the "Print" screen in the "File" menu using the following:

Application.SendKeys "%fp%ri", True or
Application.SendKeys "%fpr", True

When I run the above, it usually gets stuck on the main Print screen and (helpfully) shows superscript key helps to tell you which keys run what. But when you add these keys to the string, nothing happens. Grrrr!

Any ideas anyone?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
What exactly are you trying to control?

By the way, SendKeys is kind of <S>totally</S> unreliable perhaps there's another method/approach you could use.
 
Upvote 0

Forum statistics

Threads
1,223,942
Messages
6,175,544
Members
452,652
Latest member
eduedu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top