Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library


Opens the Print Preview window for the current document using either the default print preview template or a custom template.

C++ Information

Command group CGID_MSHTML (defined in mshtmhst.h)
Symbolic constant IDM_PRINTPREVIEW
User interface Yes. Set nCmdExecOpt to OLECMDEXECOPT_PROMPTUSER.
IOleCommandTarget::Exec parameters
pvaIn VARIANT of type VT_BSTR that specifies the path to a custom template. May be set to NULL to use the Windows Internet Explorer default print template.
pvaOut Set to NULL.
Header file mshtmcid.h
Applies to IHTMLDocument2::execCommand, IHTMLDocument2::queryCommandEnabled, IHTMLDocument2::queryCommandIndeterm, IHTMLDocument2::queryCommandState, IHTMLDocument2::queryCommandSupported, IHTMLDocument2::queryCommandValue, IOleCommandTarget::Exec, IOleCommandTarget::QueryStatus.


If no template path is supplied, MSHTML will use the default print preview template.

Minimum Availability

Internet Explorer 5.5 and later.

See Also

Community Additions

© 2015 Microsoft