呼叫被callee PowerPoint自动化拒绝 [英] Call was rejected by callee PowerPoint Automation
问题描述
我有一个自动化PowerPoint的命令栏模型。我最近遇到一个奇怪的问题,当PowerPoint通过我的应用程序打开,并通过我的应用程序加载数据以填充菜单。如果用户右键点击PowerPoint,我会收到错误消息:
I have a commandbar model which automates PowerPoint. I recently faced a strange problem that when PowerPoint is opened through my application, and the data is being loaded through my application to populate the menu. If a user right clicks on PowerPoint I get the error message:
呼叫被被叫方powerpoint拒绝
Call was rejected by callee powerpoint
如何解决这个问题?我使用Office 2003/2007和VB.NET办公自动化。
How do I resolve this? I'm using Office 2003/2007 and VB.NET for office automation.
推荐答案
您看到本教程吗?:
如何:修复'应用程序忙'和'呼叫被拒绝由Callee'错误
要修复错误:
1.将以下类添加到您的应用程序中。 >
2.添加对Microsoft Development Environment 8.0的COM引用。
这将添加对EnvDTE
code> EnvDTE80 到您的解决方案。
3.在代码中,创建一个EnvDTE80
4.调用Message.Register
来处理线程错误。
5.调用您的自动化代码
6.当您的自动化代码完成后,调用Message.Revoke
删除线程错误处理程序。
To fix errors:
1. Add the following class to your application.
2. Add a COM reference toMicrosoft Development Environment 8.0.
This adds references toEnvDTE
andEnvDTE80
to your solution.
3. In the code, create an instance ofEnvDTE80
, as outlined in the following example.
4. CallMessage.Register
to handle thread errors.
5. Call your automation code as usual.
6. When your automation code is finished, callMessage.Revoke
to remove the thread error handlers.
这篇关于呼叫被callee PowerPoint自动化拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!