C++, MFC and Word Automation

P

Philip

I am creating an empty MFC project for purposes of
testing WORD automation.... however I am getting a lot of
compile errors on importing the msword.olb type
library. I am using the following syntax.....

#import "C:\Program Files\Microsoft Office\Office10
\MSWORD.OLB"
rename "ExitWindows","MyExitWindows"),named_guids,rename_n
amespace("MSWord")
using namespace MSWord;

Any idea what I am doing wrong...?


Thanks

Philip
 
D

Dave Hart

Philip

You need to import more than just the msword.olb file.
Here is what I have used with Word2000:

#import "c:\Program Files\Microsoft Office\Office\mso9.dll"
#import "c:\Program Files\Common Files\Microsoft
Shared\VBA\VBA6\vbe6ext.olb"
#import "c:\Program Files\Microsoft Office\Office\msword9.olb"

Dave Hart

I am creating an empty MFC project for purposes of
testing WORD automation.... however I am getting a lot of
compile errors on importing the msword.olb type
library. I am using the following syntax.....

#import "C:\Program Files\Microsoft Office\Office10
\MSWORD.OLB"
rename "ExitWindows","MyExitWindows"),named_guids,rename_n
amespace("MSWord")
using namespace MSWord;

Any idea what I am doing wrong...?


Thanks

Philip
 

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