+ Reply to Thread
Results 1 to 3 of 3

Code to Copy Excel to Word stopped working in 365 but still works on 2010

  1. #1
    Forum Contributor
    Join Date
    02-14-2007
    Location
    Chester, England
    MS-Off Ver
    2010 & 2016
    Posts
    312

    Code to Copy Excel to Word stopped working in 365 but still works on 2010

    Hello All

    I have put together some code (Attached) that was outputing different paragraphs and tables into word documents. It was working fine but has suddenly stopped working. I still have access to Excel 2010 and it works fine in that.

    Is anyone able to have a look at the code and see if there is a reason this no longer works in 365?

    It is falling over at the "PasteExcelTable" line with Error 4198 Command Failed.

    Any thoughts or advice would be great.

    Cheers

    James
    Attached Files Attached Files
    Last edited by JimmyA; 07-27-2018 at 04:47 AM.

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,158

    Re: Code to Copy Excel to Word stopped working in 365 but still works on 2010

    Maybe try it this way:
    Please Login or Register  to view this content.
    In total, I didn't change too much. What will be the result ?

  3. #3
    Forum Contributor
    Join Date
    02-14-2007
    Location
    Chester, England
    MS-Off Ver
    2010 & 2016
    Posts
    312

    Re: Code to Copy Excel to Word stopped working in 365 but still works on 2010

    Hi porucha vevrku

    Thanks very much for taking the time to reply to my post. I was trying to keep the "PasteExcelTable" line as it seemed to be the only way I could get the Autofit part to work. Simply pasting seems to then ignore the autofit line. It doesn't fall over but the formatting of tables remains the same.

    I have now decided to use "Paste" but then to add a few lines of code at the end of producing the word document to adjust all tables in one go.

    Please Login or Register  to view this content.
    Thanks again for your reply

    Best Regards

    James

+ 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. Excel to Word macro doesn't work on Word 2013 if sheet is hidden (works fine on 2010)
    By dreddster in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-29-2015, 04:37 AM
  2. Replies: 0
    Last Post: 07-06-2014, 06:38 PM
  3. Word 2010 add-ins not working with macro code
    By mackypogi in forum Word Formatting & General
    Replies: 0
    Last Post: 05-23-2014, 01:37 AM
  4. Both Excel and Word stopped working.
    By markmick in forum Excel General
    Replies: 1
    Last Post: 12-18-2013, 10:06 AM
  5. [SOLVED] Excel 2010 Macro not working on Windows 7 but same works perfectly on XP
    By rahulwagh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-01-2013, 02:14 PM
  6. [SOLVED] Code stopped working, can no longer copy and save a worksheet
    By Oracle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2012, 07:56 PM
  7. Excel code stopped working
    By Jollyfrog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-28-2010, 07:34 AM

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