This documentation is archived and is not being maintained.

Document.Close Method

Office 2007
Closes the current publication and creates a blank publication in its place.



expression   A variable that represents a Document object.


You can use the Close method only on an open Document object in another instance of Microsoft Office Publisher. Attempting to close the active publication in the current instance of Publisher causes an error.


This example opens a publication in a new instance of Publisher for modification and then closes the publication. (Note that to make this example work, you must replace Filename with a valid file name .)

Visual Basic for Applications
Sub ModifyAnotherPublication()

    ' Create new instance of Publisher.
    Dim appPub As New Publisher.Application

    ' Open publication.
    appPub.Open FileName:="Filename"

    ' Put code here to modify the publication as necessary.

    ' Close the publication.

    ' Release the other instance of Publisher.
    Set appPub = Nothing

End Sub