我该如何解决这个错误,消息过滤器表明应用程序正忙
how can I fix this error, The message filter indicated that the application is busy
我一直在 word 中收到此错误,excel powerpoint 我该如何解决
Error=消息过滤器表明应用程序正忙。
(HRESULT 异常:0x8001010A(RPC_E_SERVERCALL_RETRYLATER))
foreach (Presentation document in Globals.ThisAddIn.Application.Presentations.Cast<Presentation>().ToList())
{
while (document.ReadOnly!= Microsoft.Office.Core.MsoTriState.msoTrue)
{
break;
}
var item = FODocumentRepository.GetByLocalPath(document.FullName);
if (item == null)
{
if (DocHelper.IfFileOrbisDocument(document.FullName))
{
FODocumentRepository.Add(document.FullName, document.FullName);
}
}
}
var repositoryList = FODocumentRepository.GetAll().ToList();
// var abc = Globals.ThisAddIn.Application.Workbooks.Cast<Workbook>().Select(x => x.FullName).ToList();
List<FODocument> deleteList = new List<FODocument>();
foreach (var item in repositoryList)
{
bool founded = false;
foreach (Presentation document in Globals.ThisAddIn.Application.Presentations)
{
if (item.LocalPath == document.FullName)
{
founded = true;
break;
}
}
if (!founded)
{
MessageBox.Show("DocumentClosed");
FileorbisConflictManager.DocumentClosed(ServiceSettings.GetToken(), DocHelper.GetDocumentKey(item.FOPath),DocumentType.PowerPoint);
deleteList.Add(item);
}
}
foreach (var item in deleteList)
{
FODocumentRepository.Remove(item.LocalPath);
}
此类错误的发生是由于外部 multi-threaded 应用程序和 Visual Studio 之间的线程争用问题。可以通过在 Visual Studio 自动化应用程序中实施 IOleMessageFilter
错误处理程序来消除它们。在 How to: Fix 'Application is Busy' and 'Call was Rejected By Callee' Errors 文章中阅读更多相关信息。
您还可以在 Exception 线程中找到相同的问题。
我一直在 word 中收到此错误,excel powerpoint 我该如何解决
Error=消息过滤器表明应用程序正忙。
(HRESULT 异常:0x8001010A(RPC_E_SERVERCALL_RETRYLATER))
foreach (Presentation document in Globals.ThisAddIn.Application.Presentations.Cast<Presentation>().ToList())
{
while (document.ReadOnly!= Microsoft.Office.Core.MsoTriState.msoTrue)
{
break;
}
var item = FODocumentRepository.GetByLocalPath(document.FullName);
if (item == null)
{
if (DocHelper.IfFileOrbisDocument(document.FullName))
{
FODocumentRepository.Add(document.FullName, document.FullName);
}
}
}
var repositoryList = FODocumentRepository.GetAll().ToList();
// var abc = Globals.ThisAddIn.Application.Workbooks.Cast<Workbook>().Select(x => x.FullName).ToList();
List<FODocument> deleteList = new List<FODocument>();
foreach (var item in repositoryList)
{
bool founded = false;
foreach (Presentation document in Globals.ThisAddIn.Application.Presentations)
{
if (item.LocalPath == document.FullName)
{
founded = true;
break;
}
}
if (!founded)
{
MessageBox.Show("DocumentClosed");
FileorbisConflictManager.DocumentClosed(ServiceSettings.GetToken(), DocHelper.GetDocumentKey(item.FOPath),DocumentType.PowerPoint);
deleteList.Add(item);
}
}
foreach (var item in deleteList)
{
FODocumentRepository.Remove(item.LocalPath);
}
此类错误的发生是由于外部 multi-threaded 应用程序和 Visual Studio 之间的线程争用问题。可以通过在 Visual Studio 自动化应用程序中实施 IOleMessageFilter
错误处理程序来消除它们。在 How to: Fix 'Application is Busy' and 'Call was Rejected By Callee' Errors 文章中阅读更多相关信息。
您还可以在 Exception 线程中找到相同的问题。