Heike Posted January 5, 2004 Posted January 5, 2004 Help!!!!!!! Until Friday everything worked fine. Today, nothing seems to work. I'm using GetObject: Dim objWordInstance As Word.Application objWordInstance = GetObject(, "Word.Application") Unfortunately after this objWordInstance is nothing even if I can see, that there is an instance of word. What might be wrong??? Quote
Leaders dynamic_sysop Posted January 5, 2004 Leaders Posted January 5, 2004 i just did a test and works fine here , maybe you could look for instances of it's process, then try the getobject. also you should really be casting the word.application from the object. eg: Dim wordApp As Word.ApplicationClass Dim p As Process() = Process.GetProcessesByName("WINWORD") If Not p.Length = 0 Then Dim objWord As Object = GetObject(, "Word.Application") wordApp = DirectCast(objWord, Word.ApplicationClass) '/// word application found and can be manipulated now. Else '/// no word app found running. End If Quote
Recommended Posts