c# - 如何解决消息过滤器指示应用程序正忙。 (来自 HRESULT : 0x8001010A (RPC_E_SERVERCALL_RETRYLATER)) 的异常

标签 c# asp.net ms-office office-interop

PowerPoint.Application PowerPoint_App;
PowerPoint_App = new PowerPoint.ApplicationClass();
PowerPoint_App.DisplayAlerts = PowerPoint.PpAlertLevel.ppAlertsNone;
PowerPoint.Presentation presentation;
presentation = null;
try
{
    PowerPoint_App.Visible = MsoTriState.msoTrue;
    presentation = PowerPoint_App.Presentations.Open(strPptFilePath, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);
    PowerPoint.Slide tempSlide = null;
    int totalSlides = presentation.Slides.Count;
    int slideNo = 0;

我在 PowerPoint_App.Presentations.Open 代码中遇到以下异常。

Exception Message: The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

我之前没有在这个代码块上收到这个错误。之前一切都运行良好。谁能帮忙?

最佳答案

我最终删除了:

 PowerPoint_App.Visible = MsoTriState.msoTrue;

它奏效了...!!!

关于c# - 如何解决消息过滤器指示应用程序正忙。 (来自 HRESULT : 0x8001010A (RPC_E_SERVERCALL_RETRYLATER)) 的异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21988095/

相关文章:

asp.net - Swagger 忽略 xml 参数标签

c# - 使用 Microsoft.Office.Interop.Word 解析表,只从第一列获取文本?

vba - 使用 VBA 查找 Office 2010 Word 文档的大纲级别

c# - 长事务的死锁

c# - 在 C# 中将大十进制值舍入到小十进制值

c# - LINQ 表达式 - 在 s Select 中使用 .Any 无法翻译

asp.net - 在长时间运行的操作完成之前保留ASP.NET页的最佳方法是什么?

c# - 如何使智能感知与 RazorEngine 一起工作?

asp.net - 缓存 MVC 操作的输出,但仅对经过身份验证的用户使用缓存版本

.net - 如何检查 COM 对象是否仍然存在