V
VinceG
I have a service running queued Word mailmerges which I am trying to get to
work under Windows Server 2008 and Office 2007 SP2. No matter what I try it
stubbornly refuses to open a docunment, either .doc or .docx. My service is a
small test app running under .Net Framework 3.5 and under a user in the
Administrators group which has full DCOM permissions. I have even disabled
UAC on the server but to no effect. It doesnt hang, but just fails to open
the document. Any ideas?
Heres the sample code which runs off a timer event:
Dim WordObj As Object ' Word.Application
Dim oWordDoc As Object ' Word.Document
Dim missing As Object = System.Reflection.Missing.Value
Dim MyFalse As Object = CObj(False)
Dim MyTrue As Object = CObj(True)
Dim DocCOunt As Integer
Try
WordObj = CreateObject("Word.Application")
'WordObj = New Word.Application
WordObj.Visible = False
oWordDoc = WordObj.Documents.Open("D:\TestApps\Test6.docx",
MyFalse, MyFalse, MyFalse, missing, missing, MyFalse, missing, missing, 0,
missing, MyFalse, MyFalse, 0, MyTrue)
work under Windows Server 2008 and Office 2007 SP2. No matter what I try it
stubbornly refuses to open a docunment, either .doc or .docx. My service is a
small test app running under .Net Framework 3.5 and under a user in the
Administrators group which has full DCOM permissions. I have even disabled
UAC on the server but to no effect. It doesnt hang, but just fails to open
the document. Any ideas?
Heres the sample code which runs off a timer event:
Dim WordObj As Object ' Word.Application
Dim oWordDoc As Object ' Word.Document
Dim missing As Object = System.Reflection.Missing.Value
Dim MyFalse As Object = CObj(False)
Dim MyTrue As Object = CObj(True)
Dim DocCOunt As Integer
Try
WordObj = CreateObject("Word.Application")
'WordObj = New Word.Application
WordObj.Visible = False
oWordDoc = WordObj.Documents.Open("D:\TestApps\Test6.docx",
MyFalse, MyFalse, MyFalse, missing, missing, MyFalse, missing, missing, 0,
missing, MyFalse, MyFalse, 0, MyTrue)