My application has worked flawlessly on all versions of Windows (up to Win 7) and Word (up to 2010). I was curious to see how the application would work in Win 8.1. I purchased an inexpensive PC with Win 8.1. The application loaded perfectly and all aspects of the internal code works perfectly EXCEPT when I execute word automation.

Here's what happens:

  • The contents of the document is created
  • The application pauses until it is time to save the document
  • I press the Word icon and the File Save screen comes up (should be invisible)
  • I have to enter a file name (a file name was previously entered and stored in a variable)
  • The file is then saved
  • After the file is saved and before the document can be closed and quitting the Word app, a 4198 error is displayed


My automation code that works perfectly in earlier version of Windows is...

--------------------------------------------------------------------------------------------------------------------------------------

Dim WordApp As Object 'Word.Application
Dim WordDoc As Object 'Word.Document

Set WordApp = GetObject("Word.Application")
If WordApp Is Nothing Then
Set WordApp = CreateObject("Word.Application")
If WordApp Is Nothing Then
Screen.MousePointer = vbDefault
MsgBox "Word was not detected or a problem starting Word has occurred", "Word Problem"
Exit Sub
End If
End If

WordApp.Visible = False

Set WordDoc = WordApp.Documents.Add

WordDoc.Activate

<<< CODE TO POPULATE THE DOCUMENT >>>

WordDoc.SaveAs SnapFileName

WordDoc.Close False

WordApp.Quit

Set WordApp = Nothing
Set WordDoc = Nothing

--------------------------------------------------------------------------------------------------------------------------------------

From what I can gather, this type of error (e.g., 4198) is an internal error to Word -- although I have not experienced this error on earlier versions of Windows running Word 2007 or Word 2010.

Just wondering if anyone else has experienced this problem on Win 8.1 and, if so, if there is a workaround. I do not know if this problem occurs in later versions of Word since my lastest version is 2010.

Any help or advise would be appreciated.