UI2.SetSaveAsDialogFileName Method
Sets the default file name for a form in the Save As dialog box.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
Sub SetSaveAsDialogFileName ( _
bstrFileName As String _
)
'Usage
Dim instance As UI2
Dim bstrFileName As String
instance.SetSaveAsDialogFileName(bstrFileName)
void SetSaveAsDialogFileName(
string bstrFileName
)
Parameters
bstrFileName
Type: System.StringThe file name of the form supplied to the Save As dialog box.
Remarks
If the bstrFileName argument is a null reference (Nothing in Visual Basic), "Form" is used as the file name. The SetSaveAsDialogFileName method may be used in conjunction with the SetSaveAsDialogLocation 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 SetSaveAsDialogFileName method of the UIObject object is used to set the default file name for the "Save As" dialog box:
thisXDocument.UI.SetSaveAsDialogFileName("Status Report.xml");