Share via


UI2.SetSaveAsDialogLocation method

Sets the initial location at which the Save As dialog starts to browse when it is opened.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
Sub SetSaveAsDialogLocation ( _
    bstrLocation As String _
)
'Usage
Dim instance As UI2
Dim bstrLocation As String

instance.SetSaveAsDialogLocation(bstrLocation)
void SetSaveAsDialogLocation(
    string bstrLocation
)

Parameters

  • bstrLocation
    Type: System.String

    The location, expressed as a URL, at which the Save As dialog box starts browsing.

Remarks

The location specified must be an absolute path and it should not include a file name. InfoPath handles invalid paths, however, and no error message is generated if an invalid path is specified for the bstrLocation argument. The SetSaveAsDialogLocation method may be used in conjunction with the SetSaveAsDialogFileName method.

Examples

In the following example, the SetSaveAsDialogLocation method of the UIObject object is used to set the initial location for the "Save As" dialog:

thisXDocument.UI.SetSaveAsDialogLocation(@"\\MyShare\\Forms");

See also

Reference

UI2 interface

UI2 members

Microsoft.Office.Interop.InfoPath namespace