How do I create a 24 hour time delayed auto reply that quotes the orginal subject line in the email

cc578j
cc578j used Ask the Experts™
on
For every email that is sent to an outlook exchange group mailbox, I need to reply with a standard message 24 hours after it was recieved.  The message must include the original emails subject, any text that was in the body of the email and CC a new mailbox.  I need the solution to work on both Outlook 2003 and Outlook 2007.  I can be client side or server based.  It seems that this is not possible with rules.  Can you provide me with a script or a solution?
Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2010
Commented:
Hi, cc578j.

The code below should get the job done.  Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools > Macro > Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects
4.  If not already expanded, expand Modules
5.  Select an existing module (e.g. Module1) by double-clicking on it or create a new module by right-clicking Modules and selecting Insert > Module.
6.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
7.  Edit the code as needed.  I included comments wherever something needs to or can change
8.  Click the diskette icon on the toolbar to save the changes
9.  Close the VB Editor
10. Create a rule that fires for these messages.
11. Set the rule's action to "run a script" and select this script as the one to run

Sub ReplyIn24(Item As Outlook.MailItem)
    Dim olkReply As Outlook.MailItem, olkRecipient As Outlook.Recipient
    Set olkReply = Item.Reply
    With olkReply
        'Change the address on the next line'
        Set olkRecipient = .Recipients.Add("someone@company.com")
        olkRecipient.Type = olCC
        .DeferredDeliveryTime = DateAdd("h", 24, Now)
        .Send
    End With
    Set olkReply = Nothing
End Sub

Open in new window

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial