Table of contents
Collapse the table of content
Expand the table of content

Page.SaveAsPicture Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
3 Contributors

Saves a page as a picture file.


expression. SaveAsPicture( Filename, pbResolution)

_expression_A variable that represents a Page object.


NameRequired/OptionalData TypeDescription
FilenameRequiredStringThe path and file name of the new picture file you want to create. The graphics format the picture is saved in is determined by the file name extension (such as .jpg or .gif) you specify.
pbResolutionOptionalPbPictureResolutionThe resolution in which you want the picture to be saved. See Remarks for possible values.


Possible values for the pbResolution parameter are declared in the PbPictureResolution enumeration in the Microsoft Publisher type library.


The following Microsoft Visual Basic for Applications (VBA) macro shows how to use the SaveAsPicture method to save the first page of the active publication as a .jpg picture file.

Before running this code, replace filename.jpg with a valid file name and the path to a folder on your computer where you have permission to save files.

Public Sub SaveAsPicture_Example() 

 ThisDocument.Pages(1).SaveAsPicture "filename.jpg" 

End Sub
© 2018 Microsoft