Share via


XDocument.SaveAs Method

InfoPath Developer Reference

Saves the form to the specified Uniform Resource Locator (URL).

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.SaveAs(bstrFileUrl)

expression   An expression that returns a XDocument object.

Parameters

Name Required/Optional Data Type Description
bstrFileUrl Required String The URL address that the form should be saved to.

Return Value
Nothing

Remarks

The SaveAs method will return an error if called from a form that is not fully trusted.

Bb229813.vs_note(en-us,office.12).gif  Note
The URL that the form is saved to must be in the same domain as the form that calls the SaveAs method.

Security Level 3: Can be accessed only by fully trusted forms.

Example

In the following example, the SaveAs method of the XDocument object is used to save a form:

JScript
  XDocument.SaveAs("C:\\MyForm.xml");

See Also