L
leiz
Hi,
I am using COM to automate Word. In the main thread of my program, I
store all the Document objects from Application.Documents. In one event
handler (the event generated by Word), if i get all the current
documents using Application.Documents, the objects I got are not same
ones stored previously. The event handler is called by some threads
generated by C#. But, if I get all the current documents using my own
threads, the ones returned are the same ones previously stored.
I did synchronize and all threads are MTA.
Can anyone please tell me why this is?
Thanks a lot
I am using COM to automate Word. In the main thread of my program, I
store all the Document objects from Application.Documents. In one event
handler (the event generated by Word), if i get all the current
documents using Application.Documents, the objects I got are not same
ones stored previously. The event handler is called by some threads
generated by C#. But, if I get all the current documents using my own
threads, the ones returned are the same ones previously stored.
I did synchronize and all threads are MTA.
Can anyone please tell me why this is?
Thanks a lot