Share via


_XDocument4.SaveAs method (String)

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

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

Syntax

'Declaration
Sub SaveAs ( _
    bstrFileUrl As String _
)
'Usage
Dim instance As _XDocument4
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

_XDocument3.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.

Examples

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

See also

Reference

_XDocument4 interface

_XDocument4 members

SaveAs overload

Microsoft.Office.Interop.InfoPath namespace