A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Reminder



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 6th 06, 03:56 AM posted to microsoft.public.outlook.program_vba
BigPig
external usenet poster
 
Posts: 1
Default Reminder

Hello all,

How do I via vba write code that will automatically put in a reminder two
days out when an email is sent out from excel?

Example. I have an excel sheet that checks for corrections of a form, once I
have made the corrections via excel userform, I have a commandbutton (email)
that opens an outlook message, pastes my comments, inserts email addresses
etc. What I would also like to do is write code that creates a reminder in
outlook that will remind me to email after a couple of days.

Here is the code that I use to send the message from excel:
Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

With OutMail

.to = "
.CC = " "
.BCC = " "
.Subject = "OER for " & Worksheets("Correction_Sheet").Range("b3") &
", Thru date " & Worksheets("Correction_Sheet").Range("e5") & "."
.Body = Focus
.Display
Application.Wait (Now + TimeValue("0:00:04"))
Application.SendKeys "%esf{enter}"

End With

Set OutMail = OutApp.CreateItem(0)
Set OutApp = Nothing

Please help.
Ads
  #2  
Old September 6th 06, 06:10 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Reminder

Add another function to create a separate Task Item with a reminder set:

Sub AddTaskWithReminder()
Dim OutApp As Outlook.Application
Dim objTask As Outlook.TaskItem

Set OutApp = CreateObject("Outlook.application")
Set objTask = OutApp.CreateItem(olTaskItem)
objTask.Subject = "Send E-mail"
objTask.ReminderSet = True
objTask.ReminderTime = DateAdd("d", 5, Date)
objTask.Display

Set OutApp = Nothing
Set objTask = Nothing
End Sub

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"BigPig" wrote:

Hello all,

How do I via vba write code that will automatically put in a reminder two
days out when an email is sent out from excel?

Example. I have an excel sheet that checks for corrections of a form, once I
have made the corrections via excel userform, I have a commandbutton (email)
that opens an outlook message, pastes my comments, inserts email addresses
etc. What I would also like to do is write code that creates a reminder in
outlook that will remind me to email after a couple of days.

Here is the code that I use to send the message from excel:
Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

With OutMail

.to = "
.CC = " "
.BCC = " "
.Subject = "OER for " & Worksheets("Correction_Sheet").Range("b3") &
", Thru date " & Worksheets("Correction_Sheet").Range("e5") & "."
.Body = Focus
.Display
Application.Wait (Now + TimeValue("0:00:04"))
Application.SendKeys "%esf{enter}"

End With

Set OutMail = OutApp.CreateItem(0)
Set OutApp = Nothing

Please help.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reminder Sound sat Outlook - General Queries 2 June 30th 06 11:18 PM
Reminder JuanPabloGallardo Outlook - Calandaring 0 April 26th 06 10:29 PM
Birthday Reminder Ron777 Outlook - Calandaring 1 April 26th 06 04:10 PM
Reminder NOT STICKING Mary G. Outlook - Calandaring 0 April 25th 06 10:48 PM
Reminder deke Outlook - Calandaring 2 April 24th 06 08:17 AM


All times are GMT +1. The time now is 09:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.