Govert:
My ribbon has a WPF dialog window which is running on another thread, is never closed, only hidden and before hiding it tries to read and write something to active workbook using ExcelAsyncUtil.QueueAsMacro() with direct access to the Application object.
Sometimes, I am getting this error: Microsoft Excel is waiting for another application to complete an OLE action.

How to address this?
1. If I sticked to the ExcelAsyncUtil.QueueAsMacro(), would avoiding using Application object help? The C API would solve this?
2. I saw there are some new Synchronizers for Excel threads – would this help?
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at http://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.
Hi all:
I think I solved it by disabling any ole message filter!
[DllImport("Ole32.dll")]
private static extern int CoRegisterMessageFilter(
IOleMessageFilter newFilter,
out IOleMessageFilter oldFilter);
Hi all:
I think I solved it by disabling any ole message filter!
[DllImport("Ole32.dll")]
private static extern int CoRegisterMessageFilter(
IOleMessageFilter newFilter,
out IOleMessageFilter oldFilter);
From: exce...@googlegroups.com [mailto:exce...@googlegroups.com] On Behalf Of Jiri Pik
Sent: Monday, September 28, 2015 5:55 AM
To: exce...@googlegroups.com
Subject: [ExcelDna] RE: Microsoft Excel is waiting for another application to complete an OLE action
And in the new WPF UI thread, if I replace
SynchronizationContext.SetSynchronizationContext(new DispatcherSynchronizationContext(Dispatcher.CurrentDispatcher));
with
SynchronizationContext.SetSynchronizationContext(new ExcelSynchronizationContext());
What would be the consequences?
From: exce...@googlegroups.com [mailto:exce...@googlegroups.com] On Behalf Of Jiri Pik
Sent: Monday, September 28, 2015 4:36 AM
To: exce...@googlegroups.com
Subject: [ExcelDna] Microsoft Excel is waiting for another application to complete an OLE action
Govert:
My ribbon has a WPF dialog window which is running on another thread, is never closed, only hidden and before hiding it tries to read and write something to active workbook using ExcelAsyncUtil.QueueAsMacro() with direct access to the Application object.
Sometimes, I am getting this error: Microsoft Excel is waiting for another application to complete an OLE action.
<image001.png>
How to address this?
1. If I sticked to the ExcelAsyncUtil.QueueAsMacro(), would avoiding using Application object help? The C API would solve this?
2. I saw there are some new Synchronizers for Excel threads – would this help?
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at http://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at http://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/d/optout.