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. |
House plants are a wonderful way to bring the beauty of the natural world into our homes. If you would like to be able to ...
Discover MoreDeciding on when to plant can often be one of the trickiest things for new gardeners to learn. While it may be a little ...
Discover MoreOne of the most important parts of gardening is learning when you should and shouldn't do certain things. The easiest way ...
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