Discussion:
Script to be scheduled as a batch job to send a message
(too old to reply)
Marius - Roma
2010-01-27 21:29:13 UTC
Permalink
I need to create a vbs or vba script to be scheduled as a batch job to send
a
specific file to a given recipient every night.
Outlook 2007 is installed on the Windows XP Pc where the script should be
scheduled, but no user interaction is available (the script should be
scheduled to run during the night).
The message should be sent via an SMTP server as no Exchange server is
available.
What is the best method I should use to create and send the message?
Is there any sample I can start from?
Regards
Marius
Ken Slovak - [MVP - Outlook]
2010-01-28 15:21:35 UTC
Permalink
Outlook is really not suitable for what you want. It is not a good match
when you need unattended operation or operation from a service. Outlook will
put up warnings and dialogs and errors that you cannot suppress, and that's
not good for unattended operation.

You really should do this using managed code and the mail facilities
provided there, not Outlook code.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
Post by Marius - Roma
I need to create a vbs or vba script to be scheduled as a batch job to send
a
specific file to a given recipient every night.
Outlook 2007 is installed on the Windows XP Pc where the script should be
scheduled, but no user interaction is available (the script should be
scheduled to run during the night).
The message should be sent via an SMTP server as no Exchange server is
available.
What is the best method I should use to create and send the message?
Is there any sample I can start from?
Regards
Marius
M
2010-02-01 22:10:26 UTC
Permalink
Hi Marius:

This will get you on the right track and should meet all your requirements:

1.) Check out the sample script at
http://gallery.technet.microsoft.com/ScriptCenter/en-us/9c466507-a57a-4bfc-bae2-289441804375.
2.) The script requires CDO (Collaboration Data Objects), which is not
installed with Outlook 2007. You can download it from
http://www.microsoft.com/downloads/details.aspx?FamilyId=2714320D-C997-4DE1-986F-24F081725D36&displaylang=en.
Note that you don't need Outlook to run this at all. You can install CDO on
any compatible Windows computer and schedule the VBS script to run every
night.
--
Regards,
M
MCTS, MCSA
Post by Marius - Roma
I need to create a vbs or vba script to be scheduled as a batch job to send
a
specific file to a given recipient every night.
Outlook 2007 is installed on the Windows XP Pc where the script should be
scheduled, but no user interaction is available (the script should be
scheduled to run during the night).
The message should be sent via an SMTP server as no Exchange server is
available.
What is the best method I should use to create and send the message?
Is there any sample I can start from?
Regards
Marius
Loading...