I have written an excel application which runs fine on WindowsXP/Office 2003 which works fine in this environment.

When I run the application on Windows 2000/Office 2000 I get a Prgram Error message (Excel.exe has generated errors and will be closed by Windows. You will need to restart the program).

The feature that fails creates a word document report. This is the code:

Dim wdApp As Word.Application
Dim wdDoc As Document
Dim wdRng As Word.Range

Set wdApp = New Word.Application

Set wdDoc = wdApp.Documents.Open(Environ("userprofile") & "\My Documents\ROI Advantage\Business Case Template AL.dot")

wdApp.Visible = False

etc etc

The line of code that causes Excel to fail is "wdApp.Visible=False"

Any ideas on how to resolve this would be appreciated.


Cheers
PeterT