PDA

View Full Version : [SOLVED] Excel Add In runtime error 4198



CallMeMaybe
10-17-2015, 04:57 PM
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

p45cal
10-17-2015, 06:26 PM
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:=Falseand 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

CallMeMaybe
10-17-2015, 07:50 PM
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.

p45cal
10-18-2015, 03:16 AM
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/office/forum/office_2007-word/vba-saveas-not-working-both-in-word-2007-and-word/a7555fbb-deab-4cbb-8441-ccf3481c18ba?auth=1

CallMeMaybe
10-18-2015, 03:40 PM
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. :thumb