Saved Property (ActiveX)

Specifies if the document has any unsaved changes.

Supported platforms: Windows only

Signature

VBA:

object.Saved
object

Type: Document

The object this property applies to.

Property Value

Read-only: Yes

Type: Boolean

Remarks

No additional remarks.

Examples

VBA:

Sub Example_Saved()
    ' This example checks to see if the current drawing has been modified.
    
    If Not ThisDrawing.Saved Then
        MsgBox "Drawing has been modified! Use the Save or SaveAs method to save the drawing.", , "Saved Example"
    Else
        MsgBox "Drawing has not been modified since the last save.", , "Saved Example"
    End If
    
End Sub

Visual LISP:

(defun c:Example_Saved()
    ;; This example checks to see if the current drawing has been modified.
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    (if (= (vla-get-Saved doc) :vlax-false)
        (alert "Drawing has been modified! Use the Save or SaveAs method to save the drawing.")
        (alert "Drawing has not been modified since the last save.")
    )
)