owc11 will run in *.aspx page using vbscript but not vb.net code

L

Loane Sharp

Hi there

I am running the .NET Framework 2.0.50215.45 on a machine with Windows XP
Pro, Office 2003 and Office Web Components 11.

I can successfully produce an OWC chart from an .aspx page using VBScript
but not VB.NET.

I installed the Primary Interop Assemblies when installing Office and they
are referenced in the Global Assembly Cache.

My *.aspx page throws a compilation error ~ Type 'ChartSpace' is not
defined ~ at the following line:

Dim objCSpace As ChartSpace = New ChartSpaceClass()

I have included the following reference at the beginning of the page:

<%@ Import Namespace="Microsoft.Office.Interop.Owc11" %>

Please help!

Best regards
Loane
 
V

Vapordan

You do not link to the interop assemblies - you never do. You link to the
COM OWC libraries in the install directory (where ever you installed the owc
from). When you set a reference to the OWC, it silently uses the PIA's.

--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc, Amazon, B&H etc


Forth-coming VSTO.NET
 

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