Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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???

  • Leaders
Posted

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

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...