supress displaying of pdf document

Brian F

Active Member
Joined
Aug 31, 2009
Messages
256
When I come to this command in my vba routine;

ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"

When my default printer is set to print a pdf, it first asks me to save the document as a pdf (that's good) after making the pdf document it then opens the document and shows it to me. I don't want it to open. I want it to save and move on. Is there a way to suppress the document from opening?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Ruddles

Well-known Member
Joined
Aug 24, 2010
Messages
5,786
Is there a setting in your PDF driver which tells it whether to just create the file or create and open it?

Failing that, you could let it open and then kill the Adobe Reader process as soon as it appears.
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,786
Office Version
  1. 2010
Platform
  1. Windows
Instead of using ExecuteExcel4Macro, you could see Help for the ExportAsFixedFormat method
 

Brian F

Active Member
Joined
Aug 31, 2009
Messages
256
This is a process I do 30 times a day, day after day. Anything other than it not opening will continue to be no fun.

BUT.... on your suggestion I went and poked around and found that there WAS a setting that that told the document to open. I unchecked the box and live is good now.

Thanks for the prod in the right direction.
 

Brian F

Active Member
Joined
Aug 31, 2009
Messages
256
It turned out there was a setting on Nitro pdf Creator that allowed me to chose to or suppress the document form opening which i was too stupid to look for without some prodding. Thank you for responding to my question. I will research ExportAsFixedFormat so I learn something.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,186
Messages
5,640,688
Members
417,161
Latest member
Devon150

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
Top