Use the ApplicationClass.XDocuments.Close method and pass it your document object:
using System; using Microsoft.Office.Interop.InfoPath; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { var app = new ApplicationClass(); var uri = @".\form1.xml"; var doc = app.XDocuments.Open(uri, 0);
app.XDocuments.Close(doc); } } }
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Use the ApplicationClass.XDocuments.Close method and pass it your document object: