_XDocument3.Save Method
Saves the form to the Uniform Resource Locator (URL) that it is currently associated with.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
Sub Save
'Usage
Dim instance As _XDocument3
instance.Save()
void Save()
Implements
_XDocument2.Save()
_XDocument.Save()
Remarks
The Save method will return an error if called from a form that is not fully trusted.
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();
}