ChangeFileOpenDirectory Method

Microsoft Publisher Visual Basic

expression.ChangeFileOpenDirectory(Dir)

expression    Required. An expression that returns one of the objects in the Applies To list.

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