How to open a browser enabled from from another from

S

Santie

I am trying to create a browser enabled template that calls another form from
a button click event. I am using “ Application.XDocuments.NewFromSolution()â€
but get the following error:
“Microsoft.Office.InfoPath.Application' does not contain a definition for
'XDocuments' and no extension method 'XDocuments' accepting a first argument
of type 'Microsoft.Office.InfoPath.Application' could be found (are you
missing a using directive or an assembly reference?)â€
I think i am missing a reference but not sure what. I have tried
Using System.Xml.Linq;
And
Using Microsoft.Office.Interop.Infopath;
But no luck. Plase help.
I am not even convinced that i am on the right trackl.
Thanks.
 
R

Rajitha

Hi,
Try, by using the below reference.
using Microsoft.Office.Interop.InfoPath.SemiTrust;
And you need to give the path of your form from where you want to open.
Application.XDocuments.NewFromSolution("path where your xsn is stored");
Please verify below link.
http://www.infopathdev.com/forums/t/3938.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top