|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Need help adding reference to Microsoft.Office.CoreUsing C#, I've created a simple wrapper class for using Excel. I have Office Pro 2003 installed on my devel machine. The wrapper class works great, reading and writing to/from Excel. To do this, I created a reference to "Microsoft Excel 11.0 Object Library", and have a "using Excel;" directive. I decided to add a method for creating a TextBox using the Shapes.AddTextBox method, which requires a Microsoft.Office.Core.MsoTextOrientation as a parameter. Unfortunately, I can't find what I need to reference to get the Microsoft.Office.Core namespace into my project. I've tried adding references to "Microsoft Office 11.0 Object Library" in COM, but that didn't provide me with the needed namespace. I then added a reference to "Office" (version 11.0.0.0) in the GAC, and received the following errors: D:\Work\CSharp\ExcelWrapper\ExcelWrapper.cs(303,10) : error CS0012: The type 'Microsoft.Office.Core.MsoTextOrientation' is defined in an assembly that is not referenced. You must add a reference to assembly 'office, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. D:\Work\CSharp\ExcelWrapper\ExcelWrapper.cs(303,20) : error CS1502: The best overloaded method match for 'Excel.Shapes.AddTextbox(Microsoft.Office.Core.MsoTextOrientation, float, float, float, float)' has some invalid arguments D:\Work\CSharp\ExcelWrapper\ExcelWrapper.cs(305,17) : error CS1503: Argument '1': cannot convert from 'Microsoft.Office.Core.MsoTextOrientation [c:\WINDOWS\assembly\GAC\Office\7.0.3300.0__b03f5f7f11d50a3a\Office.dll]' to 'Microsoft.Office.Core.MsoTextOrientation []' Any help would be greatly appreciated, Michael |
|||||||||||||||||||||||