Previous Document Next Document

Object Model Reference : Classes : D : Document : Properties : Document.Active


Document.Active

Property Active As Boolean

Description

Member of Document

The Active property returns True if the document is currently being edited by the user.

The Active property returns a read-only value.

VBA example

The following VBA example displays the list of all documents currently open. Modified (and unsaved) documents display an asterisk ( * ) next to their names, and the current document is marked as Current.

Sub Test()
 Dim d As Document
 Dim s As String
 s = "List of open documents:"
 For Each d In Documents
  s = s & vbCr & "- " & d.Title
  If d.Dirty Then s = s & "*"
  If d.Active Then s = s & " (Current)"
 Next d
 MsgBox s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.