This documentation is archived and is not being maintained.

How to: Display Documents in Print Preview

NoteNote

Some code examples in this topic use the this or Me keyword or the Globals class in a way that is specific to document-level customizations, or they rely on features of document-level customizations such as host controls. These examples can be compiled only if you have the required applications installed. For more information, see Features Available by Product Combination.

If your solution generates a report, you might want to display the report to the user in Print Preview mode.

To display a document in Print Preview

  1. Call the PrintPreview method of the document.

    this.PrintPreview();
    
    
  2. Toggle the PrintPreview property of the Application object. If the document is already in preview mode, it will be displayed in normal view, if it is in normal view, it will be displayed in preview mode.

    Application.PrintPreview = !(Application.PrintPreview); 
    
    

See Also

Show: