Accessing Shared Assembly From MSWord

Posted on 2006-06-05
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.

Question by:jkavx
    LVL 4

    Expert Comment

    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

    LVL 25

    Expert Comment

    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:

    Author Comment


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

    Accepted Solution

    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):

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Article by: Ivo
    Anonymous Types in C# by Ivo Stoykov Anonymous Types are useful when  we do not need to follow usual work-flow -- creating object of some type, assign some read-only values and then doing something with them. Instead we can encapsulate this read…
    Article by: Najam
    Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now