View Single Post
  #2  
Old August 25th 06, 03:52 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Does the Shell method work in VB Script?

Something like this should work:

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "%windir%\notepad " & WScript.ScriptFullName

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Culverin" wrote in message
...
Good Morning:

I've been trying to invoke Robert Sparnaaij's clear cache VB Script from
VB
Script code on a custom Appointment Item form using the "Shell" method.
I've
been getting "Type mismatch" runtime errors on "Shell"; indicating that it
appears that VB Script thinks that "Shell" is a variable and not a method.

Is the "Shell" method available in VB Script? If so, how do I get it to
work? If not, is there any other method I can use in VB Script to
execute a
.VBS saved in a network drive. The path I want to use is
"\\servername\foldername\foldername\Clear_cache.vb s"

Thanks for your help.


Ads