Application.ChangeFileOpenDirectory Method (Publisher)

Sets the folder in which Microsoft Publisher searches for documents. The specified folder's contents are listed the next time the Open Publication dialog box (File menu) is displayed.

Syntax

expression. ChangeFileOpenDirectory(Dir)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data Type Description
Dir Required String The directory path.

Remarks

Publisher searches the specified folder for documents until the user changes the folder in the Open Publication dialog box or the current Publisher session ends. Use the PathForPublications property of the Options object to change the default folder for documents in every Publisher session.

Example

This example changes the folder in which Publisher searches for documents. (Note that PathToDirectory must be replaced with a valid file path for this example to work.)

Sub ChangeOpenPath() 
 ChangeFileOpenDirectory Dir:="PathToDirectory" 
End Sub

See also

Application Object