DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Janice Guest

    Automatically sending an email with Outlook macros


    Hello,

    Can anybody help me out? I am trying to have an email sent every Friday at
    a specific time. My theory is to use this code, but can't figure out why
    it doesn't work:

    Dim MyTime
    MyTime = Time ' Return current system time.
    clock
    If "9:40AM" Then

    SendMessage
    Else
    End If

    As of right now I have to run the macro to send the message. I want Outlook
    to be able to look at the internal clock and when it reaches the specified
    time, send the message.
    any other approach or help with this would be appreciated.
    thanks
    Janice

  2. #2
    guanha Guest

    Re: Automatically sending an email with Outlook macros


    Do you want to create a scheduled Task ?

    I assume the following:

    You want the scheduler to run on the outlook client
    You want the task to be executed once every day

    You then need:

    To have your computer running with the outlook client open
    every day at that given time

    One simple solution to this (that might work) is something like:

    1. Create a calendar/meeting request that executes every day at a given time
    (recurrence)
    2. Code the open event in this (now custom) outlook form that sends your
    mail and then closes itself.

    You need to familiarize yourself with:

    The outlook form, vbscript (specifically the open event) and outlook VBA

    guanha

    "Janice" <vb.@127.0.0.1> wrote:
    >
    >Hello,
    >
    >Can anybody help me out? I am trying to have an email sent every Friday

    at
    >a specific time. My theory is to use this code, but can't figure out why
    >it doesn't work:
    >
    > Dim MyTime
    > MyTime = Time ' Return current system time.
    > clock
    > If "9:40AM" Then
    >
    > SendMessage
    > Else
    > End If
    >
    >As of right now I have to run the macro to send the message. I want Outlook
    >to be able to look at the internal clock and when it reaches the specified
    >time, send the message.
    >any other approach or help with this would be appreciated.
    >thanks
    >Janice



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links