Document.ReadOnly property (Publisher)

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 Document 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.

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.