vb.net – 调用被被调用者PowerPoint自动化拒绝

前端之家收集整理的这篇文章主要介绍了vb.net – 调用被被调用者PowerPoint自动化拒绝前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个自动化PowerPoint的命令栏模型.我最近遇到了一个奇怪的问题,即通过我的应用程序打开PowerPoint,并通过我的应用程序加载数据以填充菜单.如果用户右键单击PowerPoint,我会收到错误消息:

Call was rejected by callee powerpoint

我该如何解决这个问题?我正在使用Office 2003/2007和VB.NET进行办公自动化.

你看过这个教程吗?:
How to: Fix ‘Application is Busy’ and ‘Call was Rejected By Callee’ Errors

To fix errors:
1. Add the following class to your application.
2. Add a COM reference to Microsoft Development Environment 8.0. This adds references to EnvDTE and EnvDTE80 to your solution.
3. In the code,create an instance of EnvDTE80,as outlined in the following example.
4. Call Message.Register to handle thread errors.
5. Call your automation code as usual.
6. When your automation code is finished,call Message.Revoke to remove the thread error handlers.

原文链接:https://www.f2er.com/vb/255938.html

猜你在找的VB相关文章