Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / May 2006

Tip: Looking for answers? Try searching our database.

Help adding reference to Microsoft.Office.Core

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Russell - 24 May 2006 17:49 GMT
Using 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
Michael Russell - 27 May 2006 21:23 GMT
> I then added a reference to  "Office" (version 11.0.0.0) in the GAC, and
> received the following errors:
[quoted text clipped - 16 lines]
> Any help would be greatly appreciated,
> Michael

No one has any input?  This is a real problem for me, I could really use
some pointers.

Michael

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.