Home > Net >  C # Microsoft. Office. Interop. The Word how to implement the asynchronous multi-threaded?
C # Microsoft. Office. Interop. The Word how to implement the asynchronous multi-threaded?

Time:10-11

Microsoft. Office. Interop. The Word is a Task, but and System. The Task conflict, Threading,

CodePudding user response:

What's conflict????

CodePudding user response:

reference 1st floor it_gz_xi response:
how conflicts law??

Prompt the word and the system when using the task thread has

Now just don't know how to get to the asynchronous thread using Microsoft. Open Office. Interop. Word

Microsoft. Office. Interop. Word. Task usage method comes up blank

CodePudding user response:

Now very entanglements ah ~
Even using the asynchronous, but when using wordinsert will be stuck, and as if no new threads
 


//call the method
Private async System. Threading. Tasks. Task WordInsert ()
{

//Word. Application. The Documents. The Add (" D: \ \ XX dot ");
Microsoft. Office. Interop. Word. Application app.=new Microsoft Office. Interop. Word. The Application ();
Document doc=app. The Documents. The Add (" D: \ \ XX dot ");
App=doc. Application;
Doc. ActiveWindow. Visible=false;
.
.
.
}

CodePudding user response:

I am have a Thread Thread to
Microsoft. Office. Interop. Word. Application app.=new Microsoft Office. Interop. Word. The Application ();
At the time of new Application like feign death, but the word is up, the process of code is not go down,
No thread running code directly is good
  • Related