PDA

View Full Version : print from IE to Acrobat with Print Preview at 100% not "Shrink to Fit"



RCinSTP
03-05-2013, 09:26 AM
I am running the following code from a Word document, I open an html file in IE, then do Print Preview, which automatically changes to "Shrink to Fit", I need to change from Shrink to Fit to >>> 100% and then print to Adobe Acrobat PDF. Is there any way through VBA to change the print preview setting to 100%? Can it be done using "sendkeys", maybe?

Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate (strMyHTMLfileName)
READYSTATE_COMPLETE = 4
Do ' wait until page is loaded
Loop Until ie.ReadyState = READYSTATE_COMPLETE
ie.Document.body.focus
OLECMDID_PRINTPREVIEW = 7
OLECMDEXECOPT_DONTPROMPTUSER = 2
OLECMDID_OPTICAL_ZOOM = 63

ie.execWB OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_DONTPROMPTUSER