Home > Software engineering >  VC import MSWORD. Some mistakes after the OLB, beg god for help
VC import MSWORD. Some mistakes after the OLB, beg god for help

Time:10-15

Question is like this, to achieve a vc operation word document a small function, and then went to see the tutorial, but can't cross the first step is over.
First:
Use MFC class in the class wizard to add a type library, and then open the file: "C: \ Program Files \ Microsoft Office (x86) \ 13th \ MSWORD OLB"
as shown

Class view, after the completion of import all kind of click here to generate a lot of classes, the diagram below:


And then create a new class, write the following code in the class, the compiler began an error

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


On the Internet a lot of examples are not involved in this problem, so I don't know how to solve. Request a great god help!

http://jingyan.baidu.com/article/2f9b480db690e741cb6cc29b.html here is a tutorial link, find many similar tutorial didn't involve this problem.
By the way my environment Windows 10/vs2015 office2010

Then here are a few I find some of the data seems to have failed to solve problems
http://bbs.csdn.net/topics/390886808
http://www.cr173.com/html/4229_1.html

CodePudding user response:

The comment out all class members and # import... Clear the content of the compiled once again no mistake but an open comments or same as the original.
To instantiate the class object

CodePudding user response:

In a 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL

CodePudding user response:

refer to the second floor zhao4zhong1 response:
under the 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL

My current environment is Windows 7/32

CodePudding user response:

Try to change the Word 2003

CodePudding user response:

Where the application object wrapper classes, you give me look at it
  • Related