[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Accessing Shared Assembly From MSWord

Posted on 2006-06-05
4
Medium Priority
?
246 Views
Last Modified: 2011-08-18
I want to access a C# shared assembly from MSWord.  The assembly was built in Visual Studio with a keyfile, and put into c:\winnt\assembly using "gacutil /i".  But in the VBA editor, I'm unable to find the assembly under Tools/References, and when I click on Browse, and go to c:\winnt\assembly\GAC_MSIL\....\test.dll, I get an error message:  "Can't add a reference to the specified file".

This is MSWord 2002 SP3.

jkavx
0
Comment
Question by:jkavx
  • 2
4 Comments
 
LVL 4

Expert Comment

by:Nazermohideeen
ID: 16840124
I believe that office 2002 does not use the .net framework.

you will have to upgrade to office 2003 and instal the latest service pack

You can still use vb6 / vc++ libraries

NM
0
 
LVL 25

Expert Comment

by:dstanley9
ID: 16843006
Word will not let you use CLR assemblies directly.  You either need to make your classes COM-visible or create a CCW for your assembly.  Depending on how complex your interfaces are, this may or may not be possible without marshalling data in some medium (e.g. XML).

Here are a few articles to help you out:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp
http://www.devcity.net/Articles/28/1/20020328.aspx
0
 

Author Comment

by:jkavx
ID: 16849055

Do you need a CCW for Word/Excel/Ppt/Visio in Office 2003?
0
 
LVL 25

Accepted Solution

by:
dstanley9 earned 375 total points
ID: 16852370
Actually, I think it is possible to use .NET assemblies in Office 2003 if you use the Visual Studio Tools for Office (it's not free, however):

http://msdn.microsoft.com/vstudio/products/vsto/
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question