Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I control outlook messages when sending email
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00880675
Message ID:
00882784
Views:
49
Sergey
Sorry for taking so long to get back. This is the last piece for an app and I hadn't had time to test it intil now.
My problem, I think, is I am trying to run the "VBscript" as Ed's example (#8155) but get a scripting error. Can I create a method and would I still use the same Script or how much of the code would change. As you can see I am a little weak in API stuff. Do I include the "WaitForOutlook.vbs" in the project (had errors) with a prg extension. I am not doing something right.
Thanks

>Chuck,
>
>Make sure that WshShell.AppActivate parameter matches the Oulook Dialog title. You can also play with the time script waits for a dialog. To see script execution window you can temporay use
RUN /N4 cscript waitforoutlook.vbs
You can also use Wscript.Echo "..." to display messages.
'VBScript WaitForOutlook.VBS
>Set WshShell = Wscript.CreateObject("WScript.Shell")
>' this waits 20 seconds from launch to action.  You can experiment with
>' shorter or longer durations as necessary
>Wscript.Echo "Waiting for Dialog"
>Wscript.Sleep 20000
>WshShell.AppActivate "Microsoft Outlook"
>' wait 1/10th second after requesting activation of the Outlook Window
>Wscript.Sleep 100
>WshShell.SendKeys "Y"
>
Extreme Programming = Plan -> Design -> Code -> Test
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform