• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4718
  • Last Modified:

Runtime Error 4198 In Word Macro When ActiveDocument.SaveAs

Hi,

I am getting the error "Runtime Error 4198" In Word Macro when it hits the following code.

        If ActiveDocument.SaveFormat = 0 Or ActiveDocument.SaveFormat = 12 Then
            ActiveDocument.SaveAs _
            filename:=strDocName(0) & ".pdf", _
            FileFormat:=wdFormatPDF

The problem is very hard to understand as I have the same set of macros running on four different computers, but its falling over on one only.
I have run the msi from microsoft to fix the converting to pdf, but can't see why it falls over on one pc and not the others.

Cheers,
shane.
0
PrimedWebbie
Asked:
PrimedWebbie
1 Solution
 
akjainCommented:
have you tried this link (Error 4198)
0
 
PrimedWebbieAuthor Commented:
Yeah i saw that but like i said its not happening on three other computers and there are no hyperlinks in the document.
0
 
GrahamSkanRetiredCommented:
Have you tried doing the same SaveAs manually? It might give you a more informative message than 'Command failed'.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
PandaPantsCommented:
Are all the machines using the same version of Word? What version is that, by the way?
0
 
PrimedWebbieAuthor Commented:
We are using windows xp and office 2007.  We tried it manually and it worked fine.
0
 
GrahamSkanRetiredCommented:
It might be worth trying the steps in this article

http://support.microsoft.com/default.aspx/kb/921541
0
 
PrimedWebbieAuthor Commented:
I tried all the steps offered guys. Nothing worked so will have to rebuild machine.  Graham, gives me a chance to give you some more points for helping me out last time. Thanks again.
0
 
PrimedWebbieAuthor Commented:
Suggest people try these as they may help you. I had to rebuild my machine unfortunately.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now