Consulting

Results 1 to 5 of 5

Thread: Excel Add In runtime error 4198

  1. #1

    Excel Add In runtime error 4198

    First off...Sorry for my ignorance of the computer programming world. I am an end user, and have zero programming background. But I am good at understanding things and taking directions, therefore I believe with a little guidance, I may be able to resolve my issue.

    For several years, I have been using an excel add-in, entitled ExcelToWord!, written by an author named dlmille. The add-in allows me to create MS Word templates with specified bookmarks, and merge excel spreadsheets into these templates to create MS Word documents.

    I have successfully been using it on multiple machines running windows 7, along with MS Office 2007. I finally upgraded some of my equipment, and find that this add-in does not function properly on my new computers. They are running windows 8.1, with the same clean install of MS Office 2007.

    The issue occurs when ExcelToWord! attempts to create the dotx document. I keep receiving the run-time error 4198. And my only options are to end or to debug. When I click debug, the follow code is highlighted, and I'm assuming that mean this is where the problem is...

    'Note - FileFormat:= not needed - save in same format
            oWD.SaveAs Filename:=fPath & fBMName, _
            LockComments:=False, Password:="", AddToRecentFiles:=True, _
            WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
    
            SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False


    I don't know if I have provided enough information, or if I have posted this in the correct forum, but any guidance would be greatly appreciated.

    Peter Giavoni
    Last edited by CallMeMaybe; 10-17-2015 at 07:52 PM.

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    I don't know if it's an error in copy/pasting but that top green (comment) line, is too long. It should be two lines:
     'Note - FileFormat:= not needed - save in same format    
    oWD.SaveAs Filename:=fPath & fBMName, _
    LockComments:=False, Password:="", AddToRecentFiles:=True, _ 
    WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _ 
     
    SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
    and in case the line continuation characters don't copy over correctly here it is in a copiable format without such characters:
    'Note - FileFormat:= not needed - save in same format
    oWD.SaveAs Filename:=fPath & fBMName, LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:=False
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    Yes, just an error in copy/pasting. The green line actually only reads...'Note - FileFormat:= not needed - save in same format. I made the corrections in the original post.

    Do you see anything in there that looks out of place? I'm confused as to why it works seamlessly on windows 7 machines but fails on windows 8.1.

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    No, I don't see anything out of place - suggest googling for the likes of:
    Word .Saveas 4198
    There was somehting here which might be related: http://answers.microsoft.com/en-us/o...81c18ba?auth=1
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    Thanks p45cal for pointing me in the right direction. It turns out that when you install Word on an ACER machine it insists on installing the ACER Word Cloud Add-in. Once this is removed via add/remove programs (listed as abDocs) the save as works perfectly.

    Thanks for the quick response p45cal.

Posting Permissions

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