![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I need to mail a reminder twice a day at intervals.this i have done as long
as my excel is open and the code which i had put in the code module, Public RunWhen As Double Public Const cRunIntervalhour = 5 Public Const cRunWhat = "mycode" ' the name of the procedure to run Sub StartTimer() RunWhen = Now + TimeSerial(cRunIntervalhour, 0, 0) Application.OnTime EarliestTime:=RunWhen, Procedu=cRunWhat, _ Schedule:=True End Sub Sub mycode() Dim OutApp As Object Dim OutMail As Object Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(0) With OutMail .To = "..................." ' the ids to which i need to mail the reminder .CC = "" .BCC = "" .Subject = "Timesheet_remainder" .HTMLBody = "Hi All" & "" & "Please finalize the TRS both in iPTS and People Soft for this week" & " " & "Thank You" .Send End With StartTimer End Sub this I have to run everyday each time opening my excel. I need suggestions to make my macro run automatically when the excel is still closed. also plz suggest me how to do this from my outlook |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Color coding | sherylg | Outlook - Calandaring | 3 | August 29th 09 02:13 AM |
color coding | Kimi Mac | Outlook - Calandaring | 1 | February 25th 09 01:43 PM |
help coding message options | JC | Outlook and VBA | 1 | January 3rd 08 07:47 PM |
Color Coding | Jeannine | Outlook - Calandaring | 1 | May 23rd 07 02:04 AM |
macros without coding? | Keleigh-G | Outlook and VBA | 2 | June 28th 06 06:27 PM |