locked
Microsoft Word 16.0 Object Library not available in Visual Studio, but it is available in VBA IDE for Excel RRS feed

  • Question

  • How does one get the Microsoft Word 16.0 Object Library viewable in Visual Studio '19's Reference Manager?  I have uninstalled and reinstalled Microsoft 365 products.  I have double checked in Excel's VBA IDE and the reference library I am looking for is there and easily available.  I have tried also loading in the MSWord.OLB file (the same one in Excel's VBA IDE), but Visual Stuido won't allow me to enable that reference.

    How do I fix this as trying to load the MSWord.OLB file gives the following response:

    "A reference to 'C:\Program Files\Microsoft Office\root\Office16\MSWORD.OLB' could not be added.  Please make sure that the file is accessible, and that it is a valid assembly or COM component"


    Wednesday, September 2, 2020 4:02 AM

All replies

  • MSWORD.OLB is the right file

    If I add with VS 2019 :

    "C:\Program Files (x86)\Microsoft Office\root\Office16\MSWORD.OLB"

    it adds 

    Microsoft.Office.Interop.Word

    Wednesday, September 2, 2020 7:24 AM
  • I appreciate your reply but as I stated, I cannot check MSWord.olb.  I get the error message below.  I have uninstalled and reinstalled Office products multiple times.  I have looked into multiple tutorials and no one has the same issue that's stated below.  I am not sure what the problem is.  Could it that I have the 64-bit version of Office installed?

    "A reference to 'C:\Program Files\Microsoft Office\root\Office16\MSWORD.OLB' could not be added.  Please make sure that the file is accessible, and that it is a valid assembly or COM component"

    I apologize, I should have included the above in the first post.  Editing it to include now.

    Thursday, September 3, 2020 12:40 AM
  • Hi Josh8675,

    In order to get more efficient responses about this problem, you can consider posting your question in Developer Community forum.

    Thank you for your understanding.

    Best Regards,

    Xingyu Zhao


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, September 4, 2020 9:32 AM