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: