Smart Tag hangs on calling Marshal.GetActiveObject

G

greba

I've come across the same problem as described below, and would like
to know if anyone knows the solution to this problem.

Thanks


The following line of code:

objApplication =
(Microsoft.Office.Interop.Word._Application)Marshal.GetActiveObject(strProgId);

works when the smart tag recognizer runs 'as you type' in the
document.
Note: strProgId is "word.application.11". You can get a handle to
Word, the
Active Document and all is well!

When you go to the Smart Tags tab on the AutoCorrect Options dialog
and
click 'check document', this line of code never returns. The CPU goes
to 100%
and the only way out is to kill the process (if compiled) or stop the
Visual
Studio .NET IDE.

I've tried calling the Microsoft Support line, and they insist it is a
fault
with my code. I disagree... as I didn't write the implementation
behind
Marshal.GetActiveObject. Can someone else here help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top