Share via


_XDocument2.SaveAs method (String)

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

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

Syntax

'Declaration
Sub SaveAs ( _
    bstrFileUrl As String _
)
'Usage
Dim instance As _XDocument2
Dim bstrFileUrl As String

instance.SaveAs(bstrFileUrl)
void SaveAs(
    string bstrFileUrl
)

Parameters

  • bstrFileUrl
    Type: System.String

    The URL address that the form should be saved to.

Implements

_XDocument.SaveAs(String)

Remarks

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

Note

The URL that the form is saved to must be in the same domain as the form that calls the SaveAs method.

Important

This member can be accessed only by forms opened from a form template that has been configured to run with full trust using the Security and Trust category of the Form Options dialog box. This member requires full trust for the immediate caller and cannot be used by partially trusted code. For more information, see "Using Libraries from Partially Trusted Code" on MSDN.

Examples

if(thisXDocument.IsNew)
{
thisXDocument.SaveAs("c:\\myforms\\form1.xml");
}
else
{
thisXDocument.Save();
}

See also

Reference

_XDocument2 interface

_XDocument2 members

SaveAs overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace