次の方法で共有


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.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.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.

Important

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

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.SemiTrust Namespace