Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Office 2003 not able to run wscript??

I had the script below running from an internal web page
that calls the script. There is other code to change
registry settings that has been stripped out. This
portion of the code was running fine with Office 2000.
We moved to Office 2003 and the script won't open the
spreadsheet now. Is there something new about the shell
command or wscript file in 2003 that would not allow this
to run???

dim direty1
direty1 = "T:\IncidentReporting\Reports\safety.xls"
Set shell = CreateObject("WScript.Shell")
shell.run direty1

Thanks in advance for any help!!
Gordon Cashmore
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Office 2003 not able to run wscript??

I found the same problem runnning your script from a VBS. After some
hacking I went into the registry he

HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command

and renamed the Command key to Commandx so that the "default" command was
used. After that the file opened from the script. Not much of a solution I
know.

An alternative from a VBS is using automation:

Dim XL
Set XL = CreateObject("Excel.Application")
XL.Workbooks.Open "c:\Book1.xls", 3
XL.Visible = True

Whether this is a viable alternative for your purposes I don't know.

--
Jim Rech
Excel MVP


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Office 2003 not able to run wscript??

Thanks for the help. The create object worked for me
instead of the shell command. Guess that's what happens
when a newbie tries to program.

Thanks again
-----Original Message-----
I found the same problem runnning your script from a

VBS. After some
hacking I went into the registry he

HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\comman d

and renamed the Command key to Commandx so that

the "default" command was
used. After that the file opened from the script. Not

much of a solution I
know.

An alternative from a VBS is using automation:

Dim XL
Set XL = CreateObject("Excel.Application")
XL.Workbooks.Open "c:\Book1.xls", 3
XL.Visible = True

Whether this is a viable alternative for your purposes I

don't know.

--
Jim Rech
Excel MVP


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
eula pops up every time i open an office program. office 2003 ins. ijscholl Excel Discussion (Misc queries) 0 July 28th 09 11:54 PM
Office 2007 compatibility pack on Office 2003 (slow network file fox_mulder33 Setting up and Configuration of Excel 0 January 2nd 08 03:28 PM
Upgrading from Office 2003 Small Bus to Office 2003 Pro Kelly Setting up and Configuration of Excel 0 September 25th 06 06:07 PM
Office 2000/Office 2003 Excel not printing landscape vise versa BAHTTEXT in English text Setting up and Configuration of Excel 1 April 17th 06 01:37 PM
WScript object not found (???) Tom Ogilvy Excel Programming 1 July 10th 03 10:59 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"