PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Redemption and GetNamesFromIDs

Reply

Redemption and GetNamesFromIDs

 
Thread Tools Rate Thread
Old 08-04-2005, 03:57 AM   #1
dedejavu@hotmail.com
Guest
 
Posts: n/a
Default Redemption and GetNamesFromIDs


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

  Reply With Quote
Old 08-04-2005, 06:40 PM   #2
Dmitry Streblechenko
Guest
 
Posts: n/a
Default Re: Redemption and GetNamesFromIDs

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

<dedejavu@hotmail.com> wrote in message
news:1112929078.089794.10210@z14g2000cwz.googlegroups.com...
> 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
>



  Reply With Quote
Old 08-04-2005, 07:03 PM   #3
dedejavu@hotmail.com
Guest
 
Posts: n/a
Default Re: Redemption and GetNamesFromIDs

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...79470ae7f535d2d


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

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off