WebPagePreview Method

Microsoft Publisher Visual Basic

WebPagePreview Method

Generates a Web page preview of the specified publication in Internet Explorer.

expression.WebPagePreview

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

A Web preview can be generated for print publications. However, the appearance of the Web preview may differ from the printed publication.

The Web preview opens with the active page displayed. Preview Web pages are generated for each page in the publication. However, if the publication is a print publication or otherwise lacks a navigation bar, there may be no way to navigate to those pages.

Use the PublicationType property to determine if a publication is a print publication or a Web publication.

This method corresponds to the Web Page Preview command on the File menu.

Example

The following example sets the active page of the publication and generates a Web preview of the publication.

    
With ActiveDocument
    .ActiveView.ActivePage = .Pages(2)
    .WebPagePreview
End With