Note that there are some explanatory texts on larger screens.

plurals
  1. POOpening word 2007 from vb 6
    text
    copied!<p>I have an legacy project that I am trying to debug on windows server 2003. 1) I cannot get the application to open word 2007 (installed on that machine)<br> 2) I know that the application does open on other computers as it is written - those machines are running xp or windows terminal server,<br> 3) The application is opened with the standard<br> declaration</p> <pre><code>Private wdApplication As Word.Application </code></pre> <p>and code</p> <pre><code> Set wdApplication = GetObject(, "Word.Application") If wdApplication Is Nothing Then Set wdApplication = CreateObject("Word.Application") If wdApplication Is Nothing Then Kill sFileName End If ' other code end if </code></pre> <p>any ideas as to what the windows server doesnt have set that I need to set<br> thank you I tried the methods suggested and it was not successful I went looking through my code library I inherited and I found an application that does run word correctly, it was setup by a different person (apparently)<br> it uses a class to connect to word that has these functions </p> <pre><code>Option Explicit Private bIsNewApp As Boolean Private sErrorStr As String Private oWordApp As Object Private ys As YouthSoft Public Sub MakeVisible() oWordApp.Visible = True oWordApp.ActiveDocument.Select oWordApp.Selection.GoTo 1, 1 End Sub Public Sub StartWord() 'Set oWordApp = GetObject(, "Word.Application") If oWordApp Is Nothing Then Set oWordApp = CreateObject("Word.Application") If oWordApp Is Nothing Then sErrorStr = "Microsoft Word could not be located or started. OLE Automation Error" Else bIsNewApp = True End If Else bIsNewApp = False End If End Sub </code></pre> <p>Is there some difference between this and the other code that I should be seeing I went through the references and components for both projects and they were the same in this functional area</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload