Expand Minimize
This topic has not yet been rated - Rate this topic

SetSaveAsDialogFileName Method

Office 2003

Sets the default file name for a form in the Save As dialog box.

expression.SetSaveAsDialogFileName(ByVal strFileName As String)

expression Required. An expression that returns a reference to a UI object.

strFileName Required. The file name of the form supplied to the Save As dialog box.

Security

2: 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.

Remarks

If the strFileName argument is null, "Form" is used as the file name. The SetSaveAsDialogFileName method may be used in conjunction with the SetSaveAsDialogLocation method.

Note  This object model member is not supported when the Disable Service Pack features option on the Advanced tab of the Options dialog box in InfoPath is selected or when Microsoft Office 2003 Service Pack 1 or later is not installed. Any form that implements this object model member in its code will generate an error message if it is opened in InfoPath when service pack features are disabled or unavailable.

Example

In the following example, the SetSaveAsDialogFileName method of the UI object is used to set the default file name for the Save As dialog box:

XDocument.UI.SetSaveAsDialogFileName("Status Report.xml");


Applies to | UI Object


Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.