Re: Type Mismatch error

Tech-Archive recommends: Fix windows errors by optimizing your registry




Tom Lavedas escreveu:

Your whole approach is flawed. If you are going to 'Sendkeys' to an
application, then you need to do just that. You CANNOT use the
WSH.Echo to do the job.

However, that approach is not the way to go here. What you seem to
want to do is to start Outlook experess with a command line argument of
"/mailurl:mailto:";. I don't know if that works (never tried it), but I
know that the way you are trying to do it is not the way to go. Try
the WScript.Shell objects Run Method instead, as in ...

set wshshell = CreateObject("WScript.Shell")
sCmdline = """C:\Program Files\Outlook Express\MSIMN.EXE"""_
& " /mailurl:mailto:";
wshshell.run sCmdline, 1, False

(Okay, I've tried it and this works fine to open an Outlook Express
'mailto' window.)

Hi Tom
Thanks a lot for your reply. Your script works fine for me too.
Sure looks like I was barking up the wrong tree.
Thanks for pointing me in a more productive direction.
Paul


Tom Lavedas
============
http://members.cox.net/tglbatch/wshindex.html


.