RE: Office 2007 "__missing_type__" while importing msword.olb
- From: jialge@xxxxxxxxxxxxxxxxxxxx (Jialiang Ge [MSFT])
- Date: Mon, 15 Oct 2007 01:34:57 GMT
Hello Mark,
Thank you for your reply in the post "Office 2007 "__missing_type__" while
importing msword.olb". According to the MSDN article "Compiler Warning
(level 1) C4772"
http://msdn2.microsoft.com/en-us/library/sce74ah7(VS.80).aspx, the error
"__missing_type__" means that a type library is referenced with #import
directive. However, the type library contains a reference to another type
library that was not referenced with #import. That is to say, some
prerequisite type library is not #imported. But when I checked the
reference section of MSWORD.olb and MSOUTL.olb with OLE View
(https://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae
7-96ee-b18c4790cffd&displaylang=en) , I find that the only two
prerequisites are MSO.DLL and VBE6EXT.OLB, and we have already imported
them before MSWORD.OLB and MSOUTL.OLB. Because importing Office 2007 type
libraries on a system with Office 2003 is not a supported behavior, the
compilation result is unpredictable based on our tests: It may either pass
the compilation directly, or fail in the first run, but pass in the second,
or even cannot pass the compilation at all. According to the KB article
http://support.microsoft.com/kb/244167, if you do want to use functionality
in a newer version of Office (like Office 2007), but you are developing a
project that must work on systems that contain more than one version, we
should use *late binding* to make the call, instead of referencing the type
library of a certain Office application.
For you second question about how to reuse the tlh and tli files, please
refer to the following steps. But because it is also not an expected
behavior, the compilation result is unpredictable.
1. Copy the .tlh and .tli files out and change the original #include path
in .tlh;
e.g. #include "f:\test\debug\somelib.tli" -> #include "somelib.tli"
2. Save the change and copy it to the destination project;
3. Directly include the .tlh file in the destination project.
If you have any other concern or need anything else, please feel free to
let me know.
Sincerely,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- Follow-Ups:
- RE: Office 2007 "__missing_type__" while importing msword.olb
- From: Jialiang Ge [MSFT]
- RE: Office 2007 "__missing_type__" while importing msword.olb
- References:
- RE: Office 2007 "__missing_type__" while importing msword.olb
- From: Jialiang Ge [MSFT]
- RE: Office 2007 "__missing_type__" while importing msword.olb
- From: Mark Wilson
- RE: Office 2007 "__missing_type__" while importing msword.olb
- Prev by Date: Pros and Cons of Automation add-in in C++ for Excel
- Next by Date: RE: Find text in Word - without affecting the Find dialog box
- Previous by thread: RE: Office 2007 "__missing_type__" while importing msword.olb
- Next by thread: RE: Office 2007 "__missing_type__" while importing msword.olb
- Index(es):
Relevant Pages
|