Redemption and GetNamesFromIDs

  • Thread starter Thread starter dedejavu
  • Start date Start date
D

dedejavu

Hi,
Can anyone tell me how to use Redemption's GetNamesFromIDs?
I don't know what params are and can't find any docs on it.
I'm trying to get a list of an appointment item's props. I can get the
values, but not the property names.
Thanks for your help
Pachydermitis

Dim objUtils As Redemption.MAPIUtils
Dim objPropList As Redemption.PropList
Dim lCounter As Long
Dim objSafeItem As Redemption.SafeAppointmentItem
Dim v
Set objUtils = New Redemption.MAPIUtils
Set objPropList = objUtils.HrGetPropList(objItem)
Set objSafeItem = Outlook.CreateObject("Redemption.Safe" &
TypeName(objItem))
objSafeItem.Item = objItem

For lCounter = 1 To objPropList.Count
v = objSafeItem.Fields(objPropList.Item(lCounter))
If IsArray(v) Then
Debug.Print TypeName(v), UBound(v),
objPropList.Item(lCounter)
Else
Debug.Print TypeName(v), v, objPropList.Item(lCounter)
End If
Next
 
Do you mean the symbolic names of the named properties? None of them are
documented by MS. Look at an appointment with OutlookSpy (click IMessage) -
it will display the corresponding OOM names of the named props that it knows
about.
GetNamesFromIDs means names in a sense "GUID+id used to identify a
particular named property", not in a sense "here is the property description
and what you can do ith it".

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Thanks Dmitry,
I re-read your docs and although you don't mention that function in
particular, your explanations for others are detailed enough so that I
could figure it out. All I needed was an identifier for each prop so
that I could sync two appointments, and GetNamesFromIDs gave me what I
needed. Your software is great, thanks for working so hard and making
it available to all of us.
Pachydermitis

In case you read this reply I have a question regarding SafeCurrentUser
vs. CurrentUser that I suspect only you can answer.
http://groups-beta.google.com/group...566f/279470ae7f535d2d&rnum=3#279470ae7f535d2d


For anyone else who happens to be looking for the same thing I was,
below is an example

Private Sub FigureOutIDS(ByVal objItem As Object)
Dim objUtils As Redemption.MAPIUtils
Dim objPropList As Redemption.PropList
Dim lCounter As Long
Dim objSafeItem As Object
Dim lPropTag As Long
Dim vProperty
Dim strOutPut As String
Dim strGuid As String
Dim vID
Set objUtils = New Redemption.MAPIUtils
Set objPropList = objUtils.HrGetPropList(objItem)
Set objSafeItem = Outlook.CreateObject("Redemption.Safe" &
TypeName(objItem))
objSafeItem.Item = objItem

For lCounter = 1 To objPropList.Count
lPropTag = objPropList.Item(lCounter)
vProperty = objSafeItem.Fields(lPropTag)
strGuid = objUtils.GetNamesFromIDs(objSafeItem, lPropTag).Guid
vID = objUtils.GetNamesFromIDs(objSafeItem, lPropTag).ID

If IsArray(vProperty) Then
strOutPut = UBound(vProperty) & ":" & vProperty(0)
Else
strOutPut = vProperty
End If
Debug.Print objUtils.GetIDsFromNames(objSafeItem, strGuid,
vID), _
vID, _
strGuid, _
Hex(lPropTag), _
strOutPut
Next
Set objSafeItem = Nothing
Set objPropList = Nothing
Set objUtils = Nothing
End Sub
 
Back
Top