This documentation is archived and is not being maintained.

ReadOnly Property.ReadOnly Property

Office 2007
Returns True if the publication is read-only; returns False if it is read/write. Read-only Boolean.

Syntax

expression.ReadOnly

expression   A variable that represents a ReadOnly Property object.

Return Value
Boolean

Example

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

Visual Basic for Applications
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



Show: