+ Reply to Thread
Results 1 to 2 of 2

VBA excel macro generates "automation error" randomly using Office 365

  1. #1
    Registered User
    Join Date
    04-10-2014
    Location
    Kolbäck
    MS-Off Ver
    2013
    Posts
    3

    VBA excel macro generates "automation error" randomly using Office 365

    I have a VBA macro for automatically create a word report using data in Access and Excel. The macro is hosted within a Excel document but are using both Word-, Excel and Access objects/dataTtemplates for the creation.

    The errors appears what it seems randomly. The macro iterates the same code a few times even in Office 365 but then it craches. The most common error messages are:

    ---------------------------------------------------------

    Error 1:

    Run-time error '-2147417851 (80010105)':

    Automation error
    The server threw an exception.

    ---------------------------------------------------------

    Error 2:

    Run-time error '462':

    The remote server machine does not exist or is unavailable

    ---------------------------------------------------------

    Error 3:

    This action cannot be completed because the application () is busy. Choose Switch To to activate and correct the problem.

    (no options are working, this hang the application)

    ---------------------------------------------------------

    If I debug usually the error orginates from the code where I ether close the workbook template I'm using:

    excelWorkbook.Close False

    ... or when I paste a chart from Excel to the Word report:

    wordDocument.ActiveWindow.Selection.PasteSpecial

    Even more strange are that sometimes if I continue to run the macro its all working again. This ONLY happens when the client office installation is O365. Office 2013 works just fine. I thought O365 and Office 2013 was fairly equal?

    Thanks in advance!

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: VBA excel macro generates "automation error" randomly using Office 365

    Not sure if this is the right forum for your problem as there is a forum for "Office 365" as well. If you get no help in the Macro/VBA then perhaps you could post in the "Office 365" forum but if so don't forget to mention that you have posted in the Macro/VBA forum and add links in both forums to the postings.

    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Macro generates the following error: "run-time error 424 object required"
    By Metrazal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2014, 06:31 PM
  2. [SOLVED] Excel Crashes or Gives "Automation Error" on Mac when running Macro
    By mlj61289 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2013, 04:39 PM
  3. Replies: 5
    Last Post: 10-08-2013, 04:33 PM
  4. Set Variable = File Path generates "Object Required" Error
    By Brian48072 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2013, 11:42 AM
  5. [SOLVED] Macro crashes "Automation error" during copy of workbook with char
    By Yorch in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2006, 05:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1