Share via


SaveAsPicture Method [Publisher 2003 VBA Language Reference]

Saves a page to a picture file.

expression.SaveAsPicture(FileName)

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

FileName  Required String. The path and file name of the new picture created. The graphics format the picture is saved in is determined by the file extension (such as .jpgor .gif) specified.

Example

This example saves the first page in the active publication as a .jpg picture file. (Note that PathToFile must be replaced with a valid file path for this example to execute properly.)

Sub SavePageAsPicture()
    ActiveDocument.Pages(1).SaveAsPicture _
        FileName:="PathToFile.jpg"
End Sub

Applies to | Page Object