vba - How to show print dialog box and have preview display on same screen -


i trying emulate ctrl-p in excel 2013 print dialog box shown on left print preview on right.

(although preview displays, have click "show print preview" first - can't seem find way force preview show every time).

i have tried following:

application.dialogs(xldialogprint).show 

this shows old style dialog box need click "preview" button

activesheet.printpreview 

this shows preview doesn't allow printer changed same screen

something this?

option explicit sub example()     application.commandbars.executemso ("printpreviewandprint") end sub 

commandbars.executemso method (link) is useful method in cases there no object model particular command.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -