views:

19

answers:

0

I have written a vb script to open a file with different filetype other than the original filetype(eg : from .doc filetype to .txt filetype)

below is my code

Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run("notepad" & "C:\OpenWith_Shell32_Doc.doc")

the above code was working fine but one day i edited the 'notepad' to 'wordpad' it is giving the below error..but i undo the changes then also it is giving the same error...

Microsoft VBScript runtime error '800a0046'
Permission denied