导入语句:
#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”
#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”
解决方案 »
- [求助]MFC 编写的程序可以读取.xml的配置文件吗
- 多线程里用timer
- 有没有什么第三方界面库可以实现软件界面的背景透明,就像VISTA系统下面的areo主题一样
- 求助:变换菜单后MDI子窗口的最小化、最大化、关闭按钮不见了
- 指定文件类型的提取
- 为什么服务器端的OnAccept()函数不能被触发?!!!!!!
- 如何在VC中为一int变量设定最大值啊?MAX_VALUE?
- 奇怪的刷新问题?当动态创建一个(CStatic)后,并响应起它的OnSize()函数,在其执行程序中
- view中为什么显示不出ListCtrl
- 在xp系统中怎么操作硬件端口?读\写
- ADO connection15::Execute太耗时,有没有其他方法啊
- MFC机制:#if !defined(AFX_STDAFX_H__561B86A7_1C71_459D_853A_C4573CC893B2__INCLUDED
http://blog.csdn.net/sgdgoodboy/article/details/2102644
Excel::_ApplicationPtr app;
Word::_ApplicationPtr app;