+ Reply to Thread
Results 1 to 4 of 4

Create Word Object not working in Office 2016 for mac.

  1. #1
    Registered User
    Join Date
    01-20-2017
    Location
    HONG KONG
    MS-Off Ver
    2016
    Posts
    2

    Create Word Object not working in Office 2016 for mac.

    I have a macro that copies value from an excel file over to a word file.
    The macro works fine on office 2016 on PC and also on office 2011 on mac, however throws an automation error in office 2016 on mac.

    The automation error is thrown when I am creating the word application object.
    I have checked the references and the word 16 object is correctly referenced.

    This is the code where it errors out. (CreateObject("Word.Application")). Any one has any ideas or solution ?

    Dim wApp As Word.Application
    Set wApp = CreateObject("Word.Application")
    Set wDoc = wApp.Documents.Open(strWordFile)
    wApp.Visible = True

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Create Word Object not working in Office 2016 for mac.

    Hi,

    I think this got broken completely in an update. No early bound cross-application automation seems to work now whereas before it was only erratic. I think you must late bind it as here- http://www.rondebruin.nl/mac/mac030.htm
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    01-20-2017
    Location
    HONG KONG
    MS-Off Ver
    2016
    Posts
    2

    Re: Create Word Object not working in Office 2016 for mac.

    This is exactly what i am doing.
    Set appWD = CreateObject("Word.application") 'creates a Word application

    But office 2016 on Mac crashes on this. Is there any other may I can open a word file on office 2016 for Mac.

    Thx

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Create Word Object not working in Office 2016 for mac.

    It seems that although the code crashes, Word is in fact launched. Perhaps an error handler will suffice? If not, it may require Apple Script to launch Word.

+ 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. Replies: 1
    Last Post: 12-18-2016, 11:47 PM
  2. [SOLVED] custom menu through .xlam Addin visible but not working Office 2016
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-15-2016, 12:29 PM
  3. Replies: 1
    Last Post: 08-07-2016, 05:52 PM
  4. [SOLVED] Code not working in Office 2010 and Office 2016
    By amitmodi_mrt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2016, 02:48 PM
  5. Replies: 2
    Last Post: 05-24-2016, 10:43 PM
  6. Conditional formatting with udf issues with Office 2016 / Office 365
    By andikeep2580 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-22-2016, 10:58 AM
  7. [SOLVED] Office 2016 cell comments on hover not working
    By leaning in forum Excel General
    Replies: 1
    Last Post: 01-10-2016, 11:20 PM

Tags for this Thread

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