Excel 2010 VBA Macro Error - Library Not Registered RRS feed

  • Question

  • We are using Office 2010 and Lync 2013.

    When trying to run the macro below, an error appears Run-time error '-2147319779 (8002801d)': Automation error Library not registered.

    I have tried registering Excel, Word, and have tried deleting the Registry value for 2013. Nothing works. The only way I have gotten around it is by installing all of Office 2013. Is there any other change I can make for the user besides installing 2013? Company standard is 2010 and management would prefer to keep users on this standard if possible.

    Sub shovedatatoMSWord()

    Dim wApp As Word.Application

    Dim wDoc As Word.Document

    Set wApp = CreateObject("Word.Application")

    wApp.Visible = True

    Set wDoc = wApp.Documents.Add

    wDoc.Content.InsertAfter Range("A1")

    End Sub

    Monday, August 10, 2015 7:11 PM

All replies

  • Hi Dejan,

    This is the forum to discuss questions and feedback for Microsoft Office Excel, I'll move your question to the MSDN forum:

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    Emi Zhang
    TechNet Community Support

    It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact

    Tuesday, August 11, 2015 1:33 AM
  • Hi Mark

    Which line of code triggers the error?

    Have you checked in Tools/References which version of the various Office libraries are referenced (should be 12 for 2010; 15 is 2013)? If the references are pointing to the wrong version, deactivate it, look for the correct one in the list and check that, instead.

    Have you tried installing Office 2010 (or uninstalling, re-installing)?

    If you change your declarations from "As Word.[object]" to "As Object" (from early to late binding) does the code then run?

    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, August 11, 2015 3:12 PM