Macros really can make life easier. It is not uncommon to create macros that perform repetitive tasks, and thereby relieve us of the mundane tasks we might otherwise need to perform. It is also not uncommon to need to print out the current document after doing some processing on it. If you find yourself with this need, you can simply let the macro take care of printing the current document. To add this capability to your macros, simply include a line like this:
ActiveDocument.PrintOut Copies:=1
The PrintOut method prints the specified document; in this case, the ActiveDocument object—the document currently selected—is printed. In this particular usage, the Copies argument is used to specify how many copies of the document to print.
When using the PrintOut method, there are quite a few different arguments you can use. Rather than detail all of them, it is probably more useful to just look at some of the more common arguments you can use.
Argument | Meaning | |
---|---|---|
Copies | The number of copies to print. | |
Pages | The page ranges to print. The ranges are separated by commas and enclosed in quote marks, similar to how you specify page ranges in the Print dialog box. | |
PrintToFile | Normally False, but you can set it to True if you want output to go to a disk file instead of the printer. | |
OutputFileName | Only necessary if you set PrintToFile to True. Used to specify the file name of the output file. |
How can you tell a good nursery from an incompetent one? There are a few things you need to look for, and taking the time ...
Discover MoreGardening can be difficult enough, without adding the problems that can come from less than desirable soil conditions. ...
Discover MoreIf you are a gardener, or even thinking of gardening, you will need to be able to identify some of the more common garden ...
Discover MoreFREE SERVICE: Receive an e-mail several times each week with a featured gardening tip. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
FREE SERVICE: Receive an e-mail several times each week with a featured gardening tip. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments