End Google Ads 201810 - BS.net 01 --> Hey Guys

In our company we switched from Office 2000 to 2010 a couple of days ago. Now we have a very strange Problem. About 6 different applications could create Word reports (data sheets for heat plate exchangers) under Office 2000. Now under 2010 sometimes we can generate the Word report (on the first start after logon), then after the 2nd or 3rd it no longer works, Word opens but the document is blank. The error we see in those applications is "OLE Automation ERROR".

To trace the problem i wrote the following c# application:

_Application wordApplication = new Microsoft.Office.Interop.Word.Application();
var f = new FileInfo(txtPath.Text);

object o_null = Missing.Value;
object o_true = "";
object o_false = "";
object o_filePath = @"" + f.FullName;
Document doc = wordApplication.Documents.Open(ref o_filePath, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null, ref o_null);
String text = doc.Content.Text;
Thats the relevant part of the code, there is just some gui-code more, nothing special. Of course the Microsoft.Office.Interop.Word-Com object is referenced.
On the first launch of this programm, reading the content of a word document works perfectly. The second time i hit the open-document button in this c#-app i get the following error:

System.Runtime.InteropServices.COMException (0x800A1066): Command failed
at Microsoft.Office.Interop.Word.Documents.Open(Object& FileName, Object& ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object& PasswordDocument, Object& PasswordTemplate, Object& Revert, Object& WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object& Encoding, Object& Visible, Object& OpenAndRepair, Object& DocumentDirection, Object& NoEncodingDialog, Object& XMLTransform)

To solve this Problem i tried almost everything:
Different users (all with local admin accounts)
Different computers (newly installed windows xp sp3)
reinstalled Office 2010 /repaired Office 2010
New domain user accounts
Changed the access rights in DCOM-Word-Object to local administrator


The weird thing is, after logging in the first time, generating one word report works, then the second time it sometimes works but on the third or fourth and so on time we get the error above.
I know, this problem lies probably more in the windows system and not the actual c# application (the other applications aren't written in c# but show the same behaviour), but i thought maybe someone of you could have an idea.
I would be really happy if anybody could help me solving this problem. It don't know anything more I could do!

regards from switzerland

Urs
modified on Tuesday, November 9, 2010 9:14 AM