SaveAsPicture Method

Microsoft Publisher Visual Basic

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.

Example

This example saves the first page in the active publication as a JPEG 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"
End Sub