CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003

    Question 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.

  2. #2
    Join Date
    May 1999
    Southern California
    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.

  3. #3
    Join Date
    Dec 2003
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)