Chapter 11. Printing and Publishing

Excel provides objects and methods for printing and previewing workbooks, worksheets, ranges, and other objects. It also allows you to publish those objects to the Web as an interactive alternative to printing and distributing hardcopies. This chapter explains how you print and publish objects from Visual Basic for Applications (VBA) as well as how to control the various aspects of printing such as printer settings, page breaks, and views. Some general features such as autofilters and default web options are most closely related to printing and publish, so they are covered here as well.

This chapter includes task-oriented reference information for the following objects and their related collections: AutoFilter, Filter, CustomView, HPageBreak, VPageBreak, PageSetup, Graphic, PublishObject, DefaultWebOptions, and WebOptions.

Tip

Code used in this chapter and additional samples are available in ch11.xls.

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.