VS 2008 Open Word Document - Memory Error
Posted
by Lord Darkside
on Stack Overflow
See other posts from Stack Overflow
or by Lord Darkside
Published on 2008-12-11T14:13:01Z
Indexed on
2010/05/29
11:02 UTC
Read the original article
Hit count: 243
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?
© Stack Overflow or respective owner