Prints the current document using either the default print template or a custom print template.
C++ Information
Remarks
If pvaIn is a VARIANT of type VT_BSTR, pvaIn specifies the path to a custom print template. If no template path is supplied, MSHTML uses the default print template.
If pvaIn is a VARIANT of type VT_I2, pvaIn can be set with the flags PRINT_DONTBOTHERUSER(0x01) and PRINT_WAITFORCOMPLETION(0x02) defined in mshtmhst.h. If 0 is specified, then the default behavior (show print dialog and do not wait for completion) occurs unless otherwise defined by the nCmdExecOpt parameter. The flags specified in the pvaIn parameter are given precedence over the OLECMDEXECOPT flags specified in the nCmdExecOpt parameter. For example, if both PRINT_DONTBOTHERUSER and OLECMDEXECOPT_PROMPTUSER are specified, PRINT_DONTBOTHERUSER has precedence and the print dialog is not displayed.
If pvaIn is a VARIANT of type VT_ARRAY, pvaIn specifies a SAFEARRAY containing (in the following order) a header BSTR, a footer BSTR, the address of an IStream pointer for a Microsoft Outlook Express header document, an alternate URL BSTR used for MSHTML in Outlook Express, and a DWORD containing flags.
Minimum Availability
Internet Explorer
5.5
and later.
See Also