Share via


Application.Documents Property

Publisher Developer Reference

Returns a Documents collection that represents all open publications. Read-only.

Syntax

expression.Documents

expression   A variable that represents a Application object.

Return Value
Documents

Example

The following example lists all of the open publications.

Visual Basic for Applications
  Dim objDocument As Document
Dim strMsg As String
For Each objDocument In Documents
    strMsg = strMsg & objDocument.Name & vbCrLf
Next objDocument
MsgBox Prompt:=strMsg, Title:="Current Documents Open", Buttons:=vbOKOnly

See Also