December 11th, 2003, 12:35 PM
MSWord Type Lib automation
I am trying to automate Word 2002 from C++ using #import.
Some of the types used as return types in methods in the Word typ lib are defined in the office type lib. For instance the type answerwizard and commandbars are used in the word type lib, but defined in the office type lib.
With this in mind, the app importing the word type lib will not compile because it doesn't know about the type 'commandbars'. However, it does know about the type 'answerwizard'. I am not sure why the app recognizes some of the types from the office type lib and it doesn't recognize other types.
December 11th, 2003, 01:13 PM
I posted two replies yesterday linking to a technical article in the MSDN about Office development using VS. That technical article is easy to find in the MSDN, and the previous answers posted yesterday are easy to find.
December 11th, 2003, 04:24 PM
Thanks for the response Sam.
I have searched MSDN fairly well and have read the article you suggested. However, it doesn't get in to the specific problem I am having of certain types not being recognized.
In a nutshell, the problem is...
I am importing the msword.olb using a #import. The msword.olb depends on the office type lib and the vb6 type lib. Certain types defined in the office and vb6 type libs are used as return types in the msword.olb. Some of these types, like assistant and answer wizard(defined in the office typelib, but used as method return types on the word application interface) can be referenced from my app that imports msword.olb. However, other types like commandbars can not be referenced.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.