> Am 15.05.2012 um 21:39 schrieb Jim Pitchford:
> 
>>      
>> s1=g.searchElementForProperty(a.kABLastNameProperty,"","",names(i),a.kABContainsSubStringCaseInsensitive)
> 
> Please use a.searchElementForPersonProperty here. 
> g.searchElementForProperty is same as a.searchElementForGroupProperty, which 
> does not help here.
> 
>> But this is producing a nil result for s.
>> 
>> The examples in MBS don't seem to cover this type of application.
>> 
>> Can anyone spot what I am doing wrong?
> 
> 
> I tried the same thing, but it fails here, too.
> Sorry, no idea why this fails.
> 
> Greetings
> Christian
Maybe try this :

  dim a As new abaddressbookMBS
  
  dim ga() as ABGroupMBS = a.groups
  
  dim name_group as string
  dim name_user as string
  
  for each g as ABGroupMBS in ga
        
    name_group=g.valueForProperty(a.kABGroupNameProperty)
    
    if name_group = "VDSC" then  // Change here the name of the Group that you 
want
      
      dim pa() as ABPersonMBS = g.members
      
      for each p as ABPersonMBS in pa
        
        name_user=p.valueForProperty(a.kABTitleProperty)+" "+ 
p.valueForProperty(a.kABFirstNameProperty)+" 
"+p.valueForProperty(a.kABLastNameProperty)
        
        if name_user = " " then
          name_user = p.valueForProperty(a.kABOrganizationProperty)
        end if
        dim i As Integer = PopUsersAB.ListCount+1
        
        PopUsersAB.AddRow name_user
      next
      PopUsersAB.ListIndex = 0
      exit
    end
    
  next

Regards
Valdemar
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to