In the clicked event for a button in an InfoPath 2007 template, I have added code that is attempting to open an infopath form with this statement using C#:
This.Application.Xdocuments.Open(tempFileName); Also tried, This.Application.XmlForms.Open(tempFileName);
But I am getting this error:
Microsoft.Office.Infopath.Application does not contain a definition for xdocuments.
The following using statements are included:
using Microsoft.Office.InfoPath;
using System;
using System.Xml;
using System.Xml.XPath;
using System.IO;
using System.Text;
What am I missing?