Run-time error '4198' on Compare method

S

Steve565656565656

Hello, I am comparing two documents using VBA and I get a 'Run-time error
'4198' Command Failed message on the code below. I added numbers for
reference only. The run-time gives me this error message on line 6.

I am using Word 2003 with SP 3 on a Windows XP machine.

Does anyone know why this is happening? Any help would be appreciated.

1 Sub TestWordCompare()
2 Dim bDoc As Word.Document
3 Dim filePatha As String

4 Set bDoc = ActiveDocument
5 filePatha = "C:\b.doc"
6 bDoc.Compare (filePatha)
7 End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top