When I use PowerShell to call Office Word Com Object the exception occured.
$:word = New-Object -ComObject 'Word.Application'
$word.Visible = $true
$doc = $word.Documents.Open($File)
$selection = $word.Selection
and then write text and table, it works well at beginning, but after about 5 minutes, the error occurs.
The PS console: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
The EventLog
Faulting application name: WINWORD.EXE, version: 14.0.7109.5000, time stamp: 0x522a4027
Faulting module name: wwlib.dll, version: 14.0.7109.5000, time stamp: 0x522a4071
Exception code: 0xc0000005
Fault offset: 0x00470f08
Faulting process id: 0x29ac
Faulting application start time: 0x01cef0b527bcb2df
Faulting application path: C:\Program Files (x86)\Microsoft Office\Office14\WINWORD.EXE
Faulting module path: C:\Program Files (x86)\Microsoft Office\Office14\wwlib.dll
Report Id: cc4bb92f-5ca9-11e3-be2d-5cf9dd738c06
I searched a lot on the internet about "Word COM Object", "RPC_E_SERVERFAULT", but there is no progress.
Any help?