Does anyone know how I can run a vbs script from a macro. I have been cobbling one toghether but cannot get it to work.
Sub Main()
Dim objShell as Object
Set objShell = _
CreateObject(âWScript.Shellâ)
objShell.Exec (âcscript \amhs-ediis1\Ad Hoc Reports\Frank\ED Scheduled Reports\SendmailEDISv2.vbsâ)
End Sub
Thanks for the reply. Yes, I did try with a mapped drive and still the same.
I am running the macro from the Cognos Scheduler âScript file name:â option in the Results tab. While monitoring the scheduler, I can see a dos window open and shut so I believe Cognos is firing the script. When I run the VBS script manually, it works.
I donât have series 7 here to test my theory, but I thought I remember that to run through Cognos scripting it mattered what directory the executable resides in. Can you put the macro in the same directory as the reports, or is it already?
oops should have proof read 2 times⌠I meant to say âto run through Cognos Scheduler, it mattered what directory the script executable resides inâ.