ReadOnly Property

Microsoft Publisher Visual Basic

expression.ReadOnly

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

Example

This example saves the active publication and notifies the user that the file is saved and if it is read-only or not.

Sub SaveAndStatus()

    Dim bStatus As Boolean

    Application.ActiveDocument.SaveAs "c:\testfile.pub"
    bStatus = Application.ActiveDocument.ReadOnly
    MsgBox "File Saved and Read-only Status = " & bStatus

End Sub