VBA: "Out of memory error" when CreateObject("Word.Application") from excel RRS feed

  • Question

  • Any one could bail me out of this error? Thanks in advance!

    FYI This code runs fine on Excel 2016 for Windows, but gives this error on Excel 2016 Mac version


    Sub printDir()
        Dim oWord As Word.Application
        Set oWord = CreateObject("Word.Application")
        Set oWord = Nothing  
    End Sub

    Friday, January 26, 2018 2:06 PM

All replies

  • Hello,

    I note that you are using the Word.Application object in Excel. Did you ever add reference to Word Object Model? What's the result if you run the code in mac Word?

    Best Regards,


    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

    Monday, January 29, 2018 10:05 AM