Application.Documents property (Publisher)

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

Syntax

expression.Documents

expression A variable that represents an Application object.

Return value

Documents

Example

The following example lists all the open publications.

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

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.