RE: Office 2007 "__missing_type__" while importing msword.olb



Thanks Jialiang.

I'm developing an Outlook Addin that needs to work with several versions of
Outlook. That includes supporting the Word editor in Outlook 2007. My Addin
knows which version of Outlook loaded it so it can execute version specific
code. For example the Outlook 2000 portion would not call any functions that
were specific to Outlook XP or newer. Therefore there would be no problems
at run-time.

What I really need to do is be able to get this project to compile on a
system with Outlook 2003 so that I can use VS2005 to debug on that system.
Unfortunately every time I build on the Outlook 2003 system I get the
"__missing_type__" error, not just the first compile.

The error says "#import referenced a type from a missing type library;" so
does that imply there is a missing file somewhere on my system?

If I copy the .TLI and .TLH files from a working system to this project, is
there some way that I can include them in the project without VS2005
recreating them every time it process an #import directive?

--
Mark Wilson



"Jialiang Ge [MSFT]" wrote:

Hello Mark,

From your post, my understanding on this issue is: you wonder why the two
Windows XP systems with Office XP behave differently when you tries to
import the type libraries of Office 12 on them. If I'm off base, please
feel free to let me know.

In order to reproduce the issue, I did a test on a system with Windows XP
SP2, Office XP SP3 and Visual Studio 2005. I copied the mso.dll,
vbe6ext.olb, msword.olb and msoutl.olb from another system with Office
2007, then add the following content into a VC project's stdafx.h
#import "C:\program files\Common Files\Microsoft Shared\OFFICE12\mso.dll"
rename("RGB", "RGB_"), rename("DocumentProperties", "DocProps"),
rename("FindText", "WordFindText"), rename("PlaySound", "OfficePlaySound")
using namespace Office;
#import "C:\Program Files\Common Files\Microsoft
Shared\VBA\VBA6\1033\VBE6EXT.OLB"
#import "C:\Program Files\Microsoft Office\Office12\MSWORD.OLB"
rename("ExitWindows", "WordExitWindows"), rename("FindText", "WordFindText")
#import "C:\Program Files\Microsoft Office\Office12\MSOUTL.OLB"
rename("CopyFile", "CopyFile_"), rename_namespace("Outlook")
using namespace Outlook;

Then I find that the first compilation of the project does cause the errors
as you mentioned, but when I compile the project again, it passed the
compilation. Although this behavior of compilation is strange, importing
Office 2007 type libraries on a system with Office XP is not an expected
behavior according to the KB article
http://support.microsoft.com/kb/244167. If you want to writing Automation
clients for multiple Office versions, the supported behavior is to
reference the type library of the earliest version of the Office
application you intend to Automate. That is to say, we should #import
Office XP type libraries if our application supports Office XP and above.
Office applications that are tested and compiled with earlier versions of a
type library continue to work, unchanged, when end users of your product
upgrade their Office installations to a more recent version. In this way
Office provides *backward compatibility*. As for this issue, we are
referencing the most recent version of Office in an old version, therefore,
the compilation result is unpredictable. If you decide to support several
versions of Office at the same time, please refer to that KB
http://support.microsoft.com/kb/244167. Thanks.

Please let me know if you have any other concerns, or need anything else.

Sincerely,
Jialiang Ge (jialge@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


.



Relevant Pages

  • Re: Product ID For Online Support
    ... >Not sure about support for the Home Use program since it ... >account will be deleted without reading. ... As I mentioned in my thread, OE and Outlook ...
    (microsoft.public.office.misc)
  • other adverse extra fans will crawl round in support of tenants
    ... then we differently pile Grover and Walt's charming ... outlook. ... Georgina, in support of treatments integrated and economic, ...
    (sci.crypt)
  • RE: Autoresponders
    ... 290846 How to use the Out of Office Assistant in Office Outlook 2003 and in ... Microsoft CSS Online Newsgroup Support ... >support, with mailbox support@, but no-one ever logs into that account. ...
    (microsoft.public.windows.server.sbs)
  • Re: Outlook Connector/Calendar Issues
    ... I spent 3 months with a Level 2 Outlook support person, ... EMO - a weekly newsletter about Outlook and Exchange: ... convert my ost files to pst format. ...
    (microsoft.public.outlook.calendaring)
  • RE: Hide from Exchagne address lists - Not Working
    ... issue is most likely caused by offline address book in Outlook 2003. ... Outlook 2003 with Cached Exchange Mode. ... complete download of whole Address book. ... Microsoft Online Partner Support ...
    (microsoft.public.exchange2000.admin)