1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Outlook Macro

Discussion in 'Software Development' started by excel2006, Nov 1, 2007.

Thread Status:
Not open for further replies.
  1. excel2006

    excel2006 Thread Starter

    Joined:
    Nov 1, 2007
    Messages:
    1
    Hi

    want a mcro that allows me to send the same message out at a paticular time every week day to the same recipients. How can this be done?
     
  2. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    You can use a VBS script with Outlook to create and send the email. Copy the code below into a text file and rename with the extension .vbs

    Then use Windows built in task scheduler (found in Control Panel) to call the script at your predetermined times. You can also create an Outlook template file and use Visual Basic to open and send it automatically.

    Code:
    Dim Outlook 
      Set Outlook = CreateObject("Outlook.Application")
      Dim Message 
      Set Message = Outlook.CreateItem(olMailItem)
      With Message
        .to = "[email protected]"
        .subject = "This is your subject"
        .body = "This is the body"
        .Attachments.Add ("C:\TEST.xls")
        .Send
       end with 
    
    Regards,
    Rollin
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/646257

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice