N
nargisb
Hi,
I am writing an Outlook add-in that syncs Appointments and Tasks from
an MS Access DB to Outlook. I have run into issues when linking
AppointmentItem Attendees to ContactItems.
I can't create the link. When an attendee is added in code and then
clicked on in UI, it does not bring up the corresponding ContactItem
screen, only a smalller dialog box with Attendee properties. I am using
Redemption too. Below is my code:
Private Sub ResolveITUser(ByVal oSafeAppt As
Redemption.SafeAppointmentItem, _
ByVal sUserName As String, _
ByVal sUserID As String)
Dim oSafeRecipient As Redemption.SafeRecipient
Dim oMapiUtils As Redemption.MAPIUtils
Dim oContact As Outlook.ContactItem
Dim oSafeContact As Redemption.SafeContactItem
Dim oAddressEntry As Redemption.AddressEntry
Dim sEmailEntryID As String
Dim sFilter As String
'--- get contactitem from user ID
sFilter = "[INFOtracUserID]=" & Chr(34) & sUserID & Chr(34)
Set oContact = m_oITUsersFld.Items.Find(sFilter)
If oContact Is Nothing Then Exit Sub
Set oSafeContact = CreateObject("INFOIPM.INFOContact")
oSafeContact.AuthKey = sOR_AUTH_KEY
oSafeContact.Item = oContact
'--- get email entry id
sEmailEntryID = oSafeContact.Email1EntryID
Set oMapiUtils = CreateObject("INFOIPM.INFOMAPIUtil")
oMapiUtils.AuthKey = sOR_AUTH_KEY
Set oAddressEntry = oMapiUtils.GetAddressEntryFromID(sEmailEntryID)
Set oSafeRecipient = oSafeAppt.Recipients.Add(sUserName)
'--- assign email entry ID for given recipient
oSafeRecipient.Fields(&HFFF0102) =
oMapiUtils.HrStringToArray(sEmailEntryID)
End Sub
Thanks,
Nargis
I am writing an Outlook add-in that syncs Appointments and Tasks from
an MS Access DB to Outlook. I have run into issues when linking
AppointmentItem Attendees to ContactItems.
I can't create the link. When an attendee is added in code and then
clicked on in UI, it does not bring up the corresponding ContactItem
screen, only a smalller dialog box with Attendee properties. I am using
Redemption too. Below is my code:
Private Sub ResolveITUser(ByVal oSafeAppt As
Redemption.SafeAppointmentItem, _
ByVal sUserName As String, _
ByVal sUserID As String)
Dim oSafeRecipient As Redemption.SafeRecipient
Dim oMapiUtils As Redemption.MAPIUtils
Dim oContact As Outlook.ContactItem
Dim oSafeContact As Redemption.SafeContactItem
Dim oAddressEntry As Redemption.AddressEntry
Dim sEmailEntryID As String
Dim sFilter As String
'--- get contactitem from user ID
sFilter = "[INFOtracUserID]=" & Chr(34) & sUserID & Chr(34)
Set oContact = m_oITUsersFld.Items.Find(sFilter)
If oContact Is Nothing Then Exit Sub
Set oSafeContact = CreateObject("INFOIPM.INFOContact")
oSafeContact.AuthKey = sOR_AUTH_KEY
oSafeContact.Item = oContact
'--- get email entry id
sEmailEntryID = oSafeContact.Email1EntryID
Set oMapiUtils = CreateObject("INFOIPM.INFOMAPIUtil")
oMapiUtils.AuthKey = sOR_AUTH_KEY
Set oAddressEntry = oMapiUtils.GetAddressEntryFromID(sEmailEntryID)
Set oSafeRecipient = oSafeAppt.Recipients.Add(sUserName)
'--- assign email entry ID for given recipient
oSafeRecipient.Fields(&HFFF0102) =
oMapiUtils.HrStringToArray(sEmailEntryID)
End Sub
Thanks,
Nargis