jeffwu

I developed the addin in MS word 2003 using VC++ 2005+ATL. I cannot
solve the problem for three days:

when I compile:

It says: error C4772: #import referenced a type from a missing type
library; '__missing_type__' used as a placeholder.

The error is in here:
#import "C:\Program Files\Common Files\Microsoft
Shared\VBA\VBA6\VBE6EXT.olb" rename_namespace("VBE6")

BUT the file( VBE6EXT.olb ) exactly is in the file.

I have no any clue how to solve it. I searched a lot through google.
But there is not any help.




Re: Visual C++ General please help me---I cannot import VBE6EXT.olb

Martin Richter

Look into the olb file. There is a reference to another external library that must be included first.

Look into the error description in the MSDN there is a samples that explains the problem.

http://msdn2.microsoft.com/en-us/library/sce74ah7.aspx

Try to import this first:

////MSO
//#import "libid:2DF8D04C-5BFA-101B-BDE5-00AA0044DE52" version("2.3") lcid("0") auto_search auto_rename

////VBE
//#import "libid:0002E157-0000-0000-C000-000000000046" version("5.3") lcid("0") auto_search auto_rename

////Word
//#import "libid:00020905-0000-0000-C000-000000000046" version("8.3") lcid("0") auto_search auto_rename






Re: Visual C++ General please help me---I cannot import VBE6EXT.olb

sita4ram

I have the same problem... Tried the offered solution and the error disappeared for the debug mode, however in the release mode it returned.

In addition another error appeared instead - I guess there is a connection between them :

fatal error C1083: Cannot open include file: '': No such file or directory ---- msstdfmt.tlh

The problematic h file looks like this:


#import "msstdfmt.dll"

#import "MSSTDFMT.DLL"

#import "msdatsrc.tlb"

#import "msvbvm60.dll" tlbid(3)

#import "dao2535.tlb" rename ("EOF","A_EOF")

#import "vb6.olb"

namespace VBEXT

{

#import "MSO.DLL" no_namespace

#import "vb6ext.olb" no_namespace

}