简体   繁体   中英

Call was rejected by callee PowerPoint Automation

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:

Call was rejected by callee powerpoint

How do I resolve this? I'm using Office 2003/2007 and VB.NET for office automation.

Did you see this tutorial?: 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM