D
digger27
I am trying to generate tasks in Outlook from excel/access based on various
activities in each. My problem is that I can't seem to get the .remindertime
to set to anything other than "12:00AM", no matter what I try. Any ideas?
My code for this section is below:
Private Sub CreatTask()
Dim olApp As Outlook.Application
Dim olNS As Outlook.NameSpace
Dim olfolder As Outlook.MAPIFolder
Dim olTaskItem As Outlook.TaskItem
Dim strBodyText As String
Set olApp = CreateObject("Outlook.Application")
Set olNS = olApp.GetNamespace("MAPI")
Set olfolder = olNS.GetDefaultFolder(olFolderTasks)
Set olTaskItem = olfolder.Items.Add("IPM.Task")
With olTaskItem
.DueDate = Date
.ReminderTime = Now() + 2
.Subject = "Rural Inspections " & Date$
.ReminderTime = Date + 1
.ReminderSet = True
.Categories = "Rural Projects"
.Save
End With
Set olTaskItem = Nothing
Set olfolder = Nothing
Set olNS = Nothing
Set olApp = Nothing
End Sub
I have tried using the following:
..ReminderTime = #2:00 PM#
..ReminderTime = "2:00 PM"
..ReminderTime = 2:00:00 PM
mytime = #2:00:00 PM#
..ReminderTime = mytime
None of these have worked. All of these return a time of 12:00 AM in the
task.
Any help would be appreciated.
Thanks in advance.
activities in each. My problem is that I can't seem to get the .remindertime
to set to anything other than "12:00AM", no matter what I try. Any ideas?
My code for this section is below:
Private Sub CreatTask()
Dim olApp As Outlook.Application
Dim olNS As Outlook.NameSpace
Dim olfolder As Outlook.MAPIFolder
Dim olTaskItem As Outlook.TaskItem
Dim strBodyText As String
Set olApp = CreateObject("Outlook.Application")
Set olNS = olApp.GetNamespace("MAPI")
Set olfolder = olNS.GetDefaultFolder(olFolderTasks)
Set olTaskItem = olfolder.Items.Add("IPM.Task")
With olTaskItem
.DueDate = Date
.ReminderTime = Now() + 2
.Subject = "Rural Inspections " & Date$
.ReminderTime = Date + 1
.ReminderSet = True
.Categories = "Rural Projects"
.Save
End With
Set olTaskItem = Nothing
Set olfolder = Nothing
Set olNS = Nothing
Set olApp = Nothing
End Sub
I have tried using the following:
..ReminderTime = #2:00 PM#
..ReminderTime = "2:00 PM"
..ReminderTime = 2:00:00 PM
mytime = #2:00:00 PM#
..ReminderTime = mytime
None of these have worked. All of these return a time of 12:00 AM in the
task.
Any help would be appreciated.
Thanks in advance.