请教出现这个错误如何解决:

[复制链接]
查看11 | 回复0 | 2009-1-30 06:28:38 | 显示全部楼层 |阅读模式
在运行一个例子时出现如下错误怎么解决:The type or namespace name \'Office\' could not be found (are you missing a using directive or an assembly reference?)注:我已经添加了引用,用了using Microsoft.Office.Core;提示错误的代码如下(就是下面第一行出现的office处有错):private void AddSubButton(Office.CommandBarPopup cb, string buttonName)
{
try
{
}
catch (Exception exc)
{
}
}       

                                                                                                不写“Office.”,直接写private void AddSubButton(CommandBarPopup cb, string buttonName)就行了。                                       
提问者对答案的评价:
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行