导入语句:
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE12\\MSO.DLL" rename("RGB", "MSORGB") rename("DocumentProperties", "MSODocumentProperties") rename("IPicture", "OfficeIPicture")
using namespace Office;#import "C:\\Program Files\\Common Files\\Microsoft Shared\\VBA\\VBA6\\VBE6EXT.OLB"
using namespace VBIDE;#import "C:\\Program Files\\Microsoft Office\\Office12\\EXCEL.EXE" rename("DialogBox", "ExcelDialogBox") rename("RGB", "ExcelRGB") rename("CopyFile", "ExcelCopyFile") rename("ReplaceText", "ExcelReplaceText")  rename("IPicture", "OfficeIPicture") no_auto_exclude
using namespace Excel;#import "C:\\Program Files\\Microsoft Office\\Office12\\MSWORD.OLB" raw_interfaces_only\
  rename("FindText","_FindText")       \
 rename("Rectangle","_Rectangle")   \
 rename("ExitWindows","_ExitWindows") \
 rename( "Application ", "ApplicationXLs ") no_auto_exclude 
编译报错:
stdafx.cpp
1>stdafx.h(64): error C2872: “Application”: 不明确的符号
1>          可能是“debug\excel.tlh(1442) : Excel::Application”
1>          或       “debug\vbe6ext.tlh(175) : VBIDE::Application”
1>stdafx.h(64): error C2872: “Application”: 不明确的符号
1>          可能是“debug\excel.tlh(1442) : Excel::Application”
1>          或       “debug\vbe6ext.tlh(175) : VBIDE::Application”
1>stdafx.h(64): error C2872: “Application”: 不明确的符号
1>          可能是“debug\excel.tlh(1442) : Excel::Application”
1>          或       “debug\vbe6ext.tlh(175) : VBIDE::Application”
1>stdafx.h(64): error C2872: “Application”: 不明确的符号
1>          可能是“debug\excel.tlh(1442) : Excel::Application”
1>          或       “debug\vbe6ext.tlh(175) : VBIDE::Application”
1>stdafx.h(64): error C2872: “Application”: 不明确的符号
1>          可能是“debug\excel.tlh(1442) : Excel::Application”
1>          或       “debug\vbe6ext.tlh(175) : VBIDE::Application”
1>stdafx.h(64): error C2872: “Application”: 不明确的符号
1>          可能是“debug\excel.tlh(1442) : Excel::Application”
1>          或       “debug\vbe6ext.tlh(175) : VBIDE::Application”
1>stdafx.h(64): error C2872: “Application”: 不明确的符号
1>          可能是“debug\excel.tlh(1442) : Excel::Application”
1>          或       “debug\vbe6ext.tlh(175) : VBIDE::Application”