I am executing the following code that worked fine in a vs2003(1.1) but seems to have decided otherwise now that I'm using vs2008(2.0/3.5):
Dim wordApp As Microsoft.Office.Interop.Word.Application
Dim wordDoc As Microsoft.Office.Interop.Word.Document
missing = System.Reflection.Missing.Value
wordApp = New Microsoft.Office.Interop.Word.Application()
Dim wordfile As Object
wordfile = "" ' path and file name goes here
wordDoc = wordApp.Documents.Open(wordfile, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing)
The error thrown when the Open is attempted is : "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Does anyone have any idea how to correct this?