Been trying to use VBScript in connection with the Windows Scripting Host as a batch language. Little vbs files that do things little things for you locally (not as a web language). Here’s a useful example that I use to maintian a listserv that I moderate. It opens the local text files containing the addresses, and loads the list maintanence page in my browser. You can modify it to open certain reports in word and spreadsheets in excel that you use together:
Set objShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") RunFile "E:htmlIN_PROGardceGroups_ardc_committee_Members.URL" RunFile "E:htmlIN_PROGardccommittee.email-only.txt" RunFile "E:htmlIN_PROGardccommittee.list.txt" RunFile "E:htmlIN_PROGardcdemocrats.email-only.txt" RunFile "E:htmlIN_PROGardcdemocrats.list.txt" Set objShell = Nothing Set objFSO = Nothing Sub RunFile(strFile) If objFSO.FileExists(strFile) Then objShell.Run Chr(34) & strFile & Chr(34) Else objShell.Popup Chr(39) & objFSO.GetFileName(strFile) & _ Chr(39) & vbCr & "could not be found!", 3, _ "Maintenance Session Error", 48 End If End Sub
I’ve tried to leverage my knowledge of VBA, but a lot of the syntax is different. Is there a VBS help file or a downloadable quick reference?