M
Mark Wilson
I’m trying to import a typelibrary for Office 12 and I have a couple of
systems where this is failing with the message
“error C4772: #import referenced a type from a missing type library;
'__missing_type__' used as a placeholderâ€.
This is in reference to the file msword.olb
I have 4 systems configured as follows:
A) Vista with Office 2007
B) XP/SP2 with Office 2003/SP3
C) XP/SP2 with Office XP/SP3
D) XP/SP2 with Office XP/SP3
All systems have the following files copied from an Office 2007
installation: mso.dll, vbe6ext.olb, msword.olb, and msoutl.olb.
The import statements are as follows:
#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\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;
However, systems A and D compile without errors while systems B and C have
error C4772. Systems C and D have the same version of Windows and Office so
there must be something other than having the files mso.dll, vbe6ext.olb,
msword.olb, and msoutl.olb on the system for a successful #import of
msword.olb. Any idea why I might be getting this error?
systems where this is failing with the message
“error C4772: #import referenced a type from a missing type library;
'__missing_type__' used as a placeholderâ€.
This is in reference to the file msword.olb
I have 4 systems configured as follows:
A) Vista with Office 2007
B) XP/SP2 with Office 2003/SP3
C) XP/SP2 with Office XP/SP3
D) XP/SP2 with Office XP/SP3
All systems have the following files copied from an Office 2007
installation: mso.dll, vbe6ext.olb, msword.olb, and msoutl.olb.
The import statements are as follows:
#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\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;
However, systems A and D compile without errors while systems B and C have
error C4772. Systems C and D have the same version of Windows and Office so
there must be something other than having the files mso.dll, vbe6ext.olb,
msword.olb, and msoutl.olb on the system for a successful #import of
msword.olb. Any idea why I might be getting this error?