Saved Property

Microsoft Publisher Visual Basic

expression.Saved

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

Remarks

If the Saved property of a modified publication returns True, the user won't be prompted to save changes when closing the publication, and all changes made to it since it was last saved will be lost.

Example

This example saves the active publication if it's been changed since the last time it was saved.

Sub Saver()

    With Application.ActiveDocument
        If Not .Saved And .Path <> "" Then .Save
    End With

End Sub