FilePrintSetup

Syntax

FilePrintSetup [.Printer = text] [.Options] [, .DoNotSetAsSysDefault = number]

Remarks

Changes the active printer or a printer's options. In Word version 6.0, the arguments for the FilePrintSetup statement correspond to the options in the Print Setup dialog box (Print command, File menu). On the Macintosh, FilePrintSetup is not available and generates an error.

Argument

Explanation

.Printer

The name of the new printer to be activated. Specify this argument exactly as it appears in the Printer Setup dialog box.

To activate the system default printer, specify an empty string ("").

.Options

Displays a dialog box showing the options for .Printer. You can use the SendKeys statement to select options.

.DoNotSetAsSysDefault

If 0 (zero) or omitted, makes .Printer the system default printer.

In Word version 6.0, this argument is unavailable and generates an error.


Examples

This Windows example changes the system default printer to the PostScript® printer attached to the COM2 port.


FilePrintSetup .Printer = "PostScript printer on COM2:"

The following Windows example uses the SendKeys statement to send the key sequence ALT+O, ALT+L, Enter to the Options dialog box for the current printer. The instructions depend on the existence of an Orientation box whose access key is O and a Landscape button in that box whose access key is L.


SendKeys "%o%l{enter}"
FilePrintSetup .Options

See Also

FilePrint, SendKeys, ToolsOptionsPrint