TaskPane mshtml error (C#)

S

StefanO-nl

Hi,
To use context sensitive help in InfoPath I've used the example found at
http://blogs.msdn.com/philoj/archive/2004/04/25/119926.aspx

However, when I deploy the InfoPath form to a client machine without VS
installed, I get the following error:
Method not found: mshtml.IHTMLDocument2
Microsoft.Office.Interop.InfoPath.SemiTrust.HTML.TaskPane.get_HTMLDocument()
,
at mySolution.OnContextChange(DocContextChangeEvent e)
at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2
_SinkHelper.OnContextChange(DocContextChangeEvent pEvent)


I've searched for answers and found that mshtml is (or was?) not installed
on clients without VS.
But how should mshtml be deployed with an InfoPath-form or is there another
way to use context sensitive help in InfoPath?
 
B

Brian Teutsch [MSFT]

The MSHTML PIA is not installed without VS.NET, you're correct. We believe
you can deploy the MSHTML PIA to your users, just like you would be sure
that the .NET Framework is installed. I don't know if there are other
options for loading arbitrary HTML in managed code. Random idea, if a
function in the task pane returns the HTML, (big if) if that return value is
XHTML you could load it into System.XML. I doubt that will work. Otherwise
you cannot interact with the HTML in the task pane via managed code.

Brian
 
S

StefanO-nl

You wrote "We believe you can deploy the MSHTML PIA to your users, just like
you would be sure that the .NET Framework is installed.", but I don't know
exactly what you mean.

I've tried to include the Microsoft.mshtml.dll (from \Program
Files\Microsoft.NET\Primary Interop Assemblies) into the xsn, I've tried to
register the dll with the setup-project I've created, I even tried to copy
the dll manually to the PIA-location on the client PC (just for testing
purposes), but nothing did the trick...
I can't expect my users to install VS.NET just because I need the MSHTML PIA
and I find it strange there is no merge module or something else to install
it separately...
 
B

Brian Teutsch [MSFT]

I wish I could help you out here, but I don't know how to do this. I know
moving the PIA has been done without a full installation of VS.NET
(obviously not allowed without licenses). Hopefully someone else here can
chime in, or perhaps the VS.NET groups can give some help.

Brian
 
S

StefanO-nl

The solution is to include the mshtml PIA in the setup project and set it's
destination location to the gac.
And also use regasm...
 

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