J
Jack Harris
We've been trying to set a follow up reminder in an Outlook contact.
Using Outlook Spy we found that when you use the dialog box in Outlook
the following properties get set:
Flag Due By
Flag Due By Next
Flag Status
Reply Time
Reply Requested
Response Requested
Reminder Set
We have been unable to get any of the properties to save, except for
due by, due by next and flag status. Any help we can get would be
appreciated.
Jack Harris
Seminars and Systems
Here's some code from our test program that shows what we are trying
to do.
Private Sub setRemindTime_Click()
Dim objContact As Outlook.ContactItem
Dim objSelection As Outlook.Selection
Dim tmp As String
Dim flag As Long
Dim utils
Dim PropSetId4 As String
Dim PropSetId2 As String
PropSetId4 = "{00062008-0000-0000-C000-000000000046}"
PropSetId2 = "{00062003-0000-0000-C000-000000000046}"
On Error GoTo ErrorHandler
Set utils = CreateObject("Redemption.MAPIUtils")
If objExplorer.CurrentFolder =
objOutlook.GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
Then
Set objSelection = objExplorer.Selection
Set objContact = objSelection.Item(1)
' Passed a date string in the format 11/15/2003 5:00:00 AM
tmp = txtRemindTime.Text
Dim Time, Request
Dim PrReminderTime, ReminderTime
Dim PrFlagDueBy, FlagDueBy
Dim PrReminderSet, ReminderSet
Dim PrFlagStatus, PrReplyRequested, PrResponseRequested,
PrReplyTime
PrFlagStatus = &H10900003
PrReplyRequested = 202833931
PrResponseRequested = 6488075
PrReplyTime = 3145792
PrFlagDueBy = utils.GetIDsFromNames(objContact.MAPIOBJECT,
PropSetId4, &H8517, True)
PrFlagDueBy = PrFlagDueBy + &H40
PrReminderTime = utils.GetIDsFromNames(objContact.MAPIOBJECT,
PropSetId4, &H8502, True)
PrReminderTime = PrReminderTime + &H40
PrReminderSet = utils.GetIDsFromNames(objContact.MAPIOBJECT,
PropSetId4, &H8503)
PrReminderSet = PrReminderSet + &HB
Time = CDate(tmp)
Request = True
utils.HrSetOneProp objContact.MAPIOBJECT, PrFlagDueBy, Time,
True
utils.HrSetOneProp objContact.MAPIOBJECT, PrReminderTime,
Time, True
utils.HrSetOneProp objContact.MAPIOBJECT, PrFlagStatus,
CInt(2), True
utils.HrSetOneProp objContact.MAPIOBJECT, PrReplyRequested,
Request, True
utils.HrSetOneProp objContact.MAPIOBJECT, PrResponseRequested,
Request, True
utils.HrSetOneProp objContact.MAPIOBJECT, PrReplyTime, Time,
True
' Do save here
utils.HrSetOneProp objContact.MAPIOBJECT, PrReminderSet,
CInt(1), True
Set utils = Nothing
Else
MsgBox "Select the contact folder and then a contact"
End If
Exit Sub
ErrorHandler:
MsgBox "Error setting Reminder: " & Err.Description
End Sub
Using Outlook Spy we found that when you use the dialog box in Outlook
the following properties get set:
Flag Due By
Flag Due By Next
Flag Status
Reply Time
Reply Requested
Response Requested
Reminder Set
We have been unable to get any of the properties to save, except for
due by, due by next and flag status. Any help we can get would be
appreciated.
Jack Harris
Seminars and Systems
Here's some code from our test program that shows what we are trying
to do.
Private Sub setRemindTime_Click()
Dim objContact As Outlook.ContactItem
Dim objSelection As Outlook.Selection
Dim tmp As String
Dim flag As Long
Dim utils
Dim PropSetId4 As String
Dim PropSetId2 As String
PropSetId4 = "{00062008-0000-0000-C000-000000000046}"
PropSetId2 = "{00062003-0000-0000-C000-000000000046}"
On Error GoTo ErrorHandler
Set utils = CreateObject("Redemption.MAPIUtils")
If objExplorer.CurrentFolder =
objOutlook.GetNamespace("MAPI").GetDefaultFolder(olFolderContacts)
Then
Set objSelection = objExplorer.Selection
Set objContact = objSelection.Item(1)
' Passed a date string in the format 11/15/2003 5:00:00 AM
tmp = txtRemindTime.Text
Dim Time, Request
Dim PrReminderTime, ReminderTime
Dim PrFlagDueBy, FlagDueBy
Dim PrReminderSet, ReminderSet
Dim PrFlagStatus, PrReplyRequested, PrResponseRequested,
PrReplyTime
PrFlagStatus = &H10900003
PrReplyRequested = 202833931
PrResponseRequested = 6488075
PrReplyTime = 3145792
PrFlagDueBy = utils.GetIDsFromNames(objContact.MAPIOBJECT,
PropSetId4, &H8517, True)
PrFlagDueBy = PrFlagDueBy + &H40
PrReminderTime = utils.GetIDsFromNames(objContact.MAPIOBJECT,
PropSetId4, &H8502, True)
PrReminderTime = PrReminderTime + &H40
PrReminderSet = utils.GetIDsFromNames(objContact.MAPIOBJECT,
PropSetId4, &H8503)
PrReminderSet = PrReminderSet + &HB
Time = CDate(tmp)
Request = True
utils.HrSetOneProp objContact.MAPIOBJECT, PrFlagDueBy, Time,
True
utils.HrSetOneProp objContact.MAPIOBJECT, PrReminderTime,
Time, True
utils.HrSetOneProp objContact.MAPIOBJECT, PrFlagStatus,
CInt(2), True
utils.HrSetOneProp objContact.MAPIOBJECT, PrReplyRequested,
Request, True
utils.HrSetOneProp objContact.MAPIOBJECT, PrResponseRequested,
Request, True
utils.HrSetOneProp objContact.MAPIOBJECT, PrReplyTime, Time,
True
' Do save here
utils.HrSetOneProp objContact.MAPIOBJECT, PrReminderSet,
CInt(1), True
Set utils = Nothing
Else
MsgBox "Select the contact folder and then a contact"
End If
Exit Sub
ErrorHandler:
MsgBox "Error setting Reminder: " & Err.Description
End Sub