Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Error 1
Reference required to assembly 'office, Version=12.0.0.0, Culture=neutral,  PublicKeyToken=71e9bce111e9429c' containing the type 'Microsoft.Office.Core.MsoTriState'. Add one to your project.
In my Reference, I add Microsoft Office Object Library Ver.12.

As I also found out that this PC i'm using contains to Excel Version, Excel2002? and the Excel2003.

But, i've declared in my reference, the version i'm using. I probably overseeing the problem. Pls help me.
Posted
Updated 8-Mar-12 14:19pm
v2
Comments
Maciej Los 9-Mar-12 12:09pm    
We need to see your code... You can always replace MsoTriState constants with its values.

1 solution

The assembly name you need to reference in your project is office.dll. Microsoft.Office.Core is the name of the namespace in the assembly.

Are you sure that your project actually has a reference to the office.dll assembly? (if you click "Show All Files" in Solution Explorer, does the References node include entry for "Office"?).

If you do already have a reference to the office.dll assembly, make sure you are referencing the 12.0.0.0 version (Office 2007), not 11.0.0.0 (Office 2003) or some other version.
 
Share this answer
 
Comments
Alan Tuscano 8-Mar-12 21:40pm    
There's Microsoft.Office.Interop.Excel

its the only reference with "Office".
What should I Add?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900