***困惑!高手指教!在VC2005中如何将MSWORD9.OLB导入,我出了一大堆错,如何解决??在线急待...***

zslearning 2007-04-05 08:52:20
我的做法是:
项目-》添加类-》TypeLib中的MFC类,然后选择OFFICE目录中的MSWORD9.OLB

但是在编译时出现了一大堆错误,我的做法不对吗?要如何改正?

正在编译...
stdafx.cpp
f:\vc项目\zs\zs\debug\msword9.tlh(6835) : warning C4003: not enough actual parameters for macro 'ExitWindows'
f:\vc项目\zs\zs\debug\msword9.tlh(6835) : error C2059: syntax error : 'constant'
f:\vc项目\zs\zs\debug\msword9.tlh(15255) : error C2146: syntax error : missing ';' before identifier 'Fonts'
f:\vc项目\zs\zs\debug\msword9.tlh(15255) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15255) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15308) : error C2146: syntax error : missing ';' before identifier 'GetFonts'
f:\vc项目\zs\zs\debug\msword9.tlh(15308) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15308) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15308) : warning C4183: 'GetFonts': missing return type; assumed to be a member function returning 'int'
f:\vc项目\zs\zs\debug\msword9.tlh(15648) : error C2146: syntax error : missing ';' before identifier 'Assistant'
f:\vc项目\zs\zs\debug\msword9.tlh(15648) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15648) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15704) : error C2146: syntax error : missing ';' before identifier 'CommandBars'
f:\vc项目\zs\zs\debug\msword9.tlh(15704) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15704) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15710) : error C2146: syntax error : missing ';' before identifier 'VBE'
f:\vc项目\zs\zs\debug\msword9.tlh(15710) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15710) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
f:\vc项目\zs\zs\debug\msword9.tlh(15772) : error C2146: syntax error : missing ';' before identifier 'FileSearch'
。。。。。。。。
。。。。。。。。
生成日志保存在“file://f:\vc项目\zs\zs\Debug\BuildLog.htm”
zs - 219 个错误,23 个警告
========== 生成: 0 已成功, 1 已失败, 0 最新, 0 已跳过 ==========


总是提示msword9.tlh出错????
各位说说如何办才好!!!!!
...全文
383 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zslearning 2007-04-18
  • 打赏
  • 举报
回复
用VC6生成的msword.h可以,但2005的这个不会用
CathySun118 2007-04-05
  • 打赏
  • 举报
回复
没有CApplication0h这个头文件吧
我#include "msword.h"没有问题
zslearning 2007-04-05
  • 打赏
  • 举报
回复
我的是word2000,当导入后没错误,但是一加上这些类的头文件,就出现这些错误!!
比如:
#include "CApplication0h"
....
再编译就会有问题...
aa211314 2007-04-05
  • 打赏
  • 举报
回复
UP
CathySun118 2007-04-05
  • 打赏
  • 举报
回复
我做了,可以。估计你的offfice版本太低
CathySun118 2007-04-05
  • 打赏
  • 举报
回复
我做了下,可以。估计你的office版本太低。
huzs_82 2007-04-05
  • 打赏
  • 举报
回复
是不是没有有using namespace的问题?

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧