Code to print a file

keeegs

Board Regular
Joined
Sep 25, 2011
Messages
145
Hi

I need code to print a file located in my C drive.

Please help!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
What code did the macro recorder gave you?
Please post it between
Code:
 tags. Thanks.
 
Upvote 0
Macro recorder gives me nothing because I am not doing any of it in excel. I am trying to get it to print PDF and word documents
 
Upvote 0
And why would you want to automate it from Excel?
A simple right-click > Print in Windows Explorer is enough to print the file...
 
Upvote 0
Because there is about 200 files. And on certain days we need different combinations of them, plus the file does extra things as well
 
Upvote 0
Hello

You would need to automate Word and Adobe from Excel VBA.
Opening up the files and print them and close the file without saving changes.
I would advise to use Google on Word automation from Excel VBA, for code to get you started.
 
Upvote 0
I used the .printout method for a while and it worked for a long time, and then it just stopped working, not sure why
 
Upvote 0

Forum statistics

Threads
1,214,800
Messages
6,121,641
Members
449,044
Latest member
hherna01

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