+ Reply to Thread
Results 1 to 4 of 4

.SaveAs error for Word (Error 4198: Command Failed)

  1. #1
    Registered User
    Join Date
    08-11-2015
    Location
    Hoboken, NJ
    MS-Off Ver
    2010
    Posts
    2

    .SaveAs error for Word (Error 4198: Command Failed)

    Hello,
    I have a long macro that fills out a table in Excel, then opens a Word document, pastes the table into it, and saves it to an inputted file path. I am getting an error on the last line of code, with a pop-up that states "Run-time error '4198': Command failed". I have no idea why, since I have basically this same exact code in another Excel file, and it runs fine without any errors. I've tried using Google to find a solution, but I've found nothing. I did read that this sometimes happens on Acer machines due to a cloud add-in, but I'm using a Dell machine. Any help would be appreciated!

    I will paste the last part of the code here:
    Please Login or Register  to view this content.
    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by 6StringJazzer; 08-24-2015 at 11:30 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: .SaveAs error for Word (Error 4198: Command Failed)

    ":" is an illegal character in a Windows filename.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    08-11-2015
    Location
    Hoboken, NJ
    MS-Off Ver
    2010
    Posts
    2

    Re: .SaveAs error for Word (Error 4198: Command Failed)

    Thank you! I cannot believe I didn't catch that- such a simple fix!

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: .SaveAs error for Word (Error 4198: Command Failed)

    OK, now I have to find out if this is really true "I have basically this same exact code in another Excel file, and it runs fine without any errors." There must be something different....

+ 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: 0
    Last Post: 06-08-2015, 01:14 AM
  2. [SOLVED] Runtime Error '1004' Method 'SaveAs' of object'_Workbook Failed
    By Angsome in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-12-2014, 02:58 PM
  3. [SOLVED] Run Time Error 'SaveAs' of object'_Workbook Failed
    By vaibhav2312 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-07-2014, 07:17 AM
  4. Replies: 8
    Last Post: 02-19-2014, 09:55 AM
  5. Run Time Error '1004': Method 'saveas' of object '_workbook' failed
    By vcuphysics in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2012, 04:50 PM
  6. Replies: 4
    Last Post: 05-04-2006, 08:00 AM
  7. [SOLVED] error 1004 Method SaveAs of Workbook failed
    By Maury Markowitz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-25-2005, 04:05 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