Attempted to read or write protected memory

G

Guest

Hi,

I'm using automation to produce word documents, and it's working fine in my
machine that have vs.net 2005 and office xp in it. BUT when I move my
application to another machine that have vs.net 2005 express edition with
office 97 I'm getting this error:
"Attempted to read or write protected memory. This is often an indication
that other memory is corrupt."

when it comes to the second line of this code :
wrdApp = new Word.Application();
// Add a new document.
wrdDoc = wrdApp.Documents.Add(ref oName, ref oFalse, ref oMissing, ref
Missing);
Do I have to upgrade the vs.net 2005 express edition to vs.net 2005 and
word97 to xp to make it work or is it some thing else!?

Cheers.
 
M

Manu

Hi

Please check if the Primary Inerop Assemblies for Office are Installed
and registered properly on the Target Machine.
To Use office automation applications. The Primary Interop assemblies
are need on the Machine. With Visual Studio 2005 Enterprise the VSTO
(Visual Studio Tools for office) are included so they are setup on
your development computer. But you need to install these on the target
computer too.

There are 2 things that you need to do
Install Office 2003
and
Install and register Primary Interop Assemblies for Office 2003


If you have further questions feel free to contact me at
(e-mail address removed)

Manu Singhal
MCP
(e-mail address removed)





Bye
Manu Singhal
MCP
(e-mail address removed)
 

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