我在 word 中不断收到此错误,excel powerpoint 如何修复它错误 = 消息过滤器指示应用程序正忙。
(从 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);
}