View Single Post
  #1  
Old November 8th 07, 02:24 AM posted to microsoft.public.outlook
gumby[_2_]
external usenet poster
 
Posts: 2
Default Adding Task to Outlook

Option Compare Database
Option Explicit

Function AddOutLookTask()
Dim OutlookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem
Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)
With OutlookTask
.Subject = "Date Case Began: " & [Forms]![frmERLR_Main]!
[DateCaseBegin] & " Action Type: " & [Forms]![frmERLR_Main]!
[ActionType] & " - " & [Forms]![frmERLR_Main]![ERLRAgencyName] & " -
Management POC: " & [Forms]![frmERLR_Main]![ManagementPOC]
.Body = "Issue: " & [Forms]![frmERLR_Main]![ERLRIssue] & " -
Recommendation: " & [Forms]![frmERLR_Main]![ERLRRec]
.ReminderSet = True
'Remind
.ReminderTime = [Forms]![frmReminder]![StartTime]
'Start Date
.StartDate = [Forms]![frmReminder]![StartDateE]
'Due .
.DueDate = [Forms]![frmReminder]![StartDateE]
.ReminderPlaySound = True
'Modify path.
.ReminderSoundFile = "C:\WINNT\Media\Ding.wav"
.Save
End With
End Function


When I call the function to add a task to outlook for the same day as
today and set the reminder time, it puts Sat 12/30/1899 in the
reminder date but the time is correct.


When I call the function for a date in the future, it gets the
reminder date correct, but defualts the time to 08:00AM.


Any ideas?

Ads