Am 15.11.2011 um 07:09 schrieb Louis:

> Hello Christian,
> 
> I'm trying to parse email adresses from my addressbook and so far, I found a
> way to retrieve the work address, but I'm just not sure how to retrieve the
> value for a.kABEmailHomeLabel
> 
> Is there an example I can refer to ?


Maybe like this?

// get an entry
  dim a as new ABAddressBookMBS
  dim p as ABPersonMBS = a.owner

// query all emails  
  dim e as ABMultiValueMBS = p.valueForProperty(a.kABEmailProperty)
  
// walk over all
  dim u as integer = e.count-1
  for i as integer = 0 to u
    dim label as string = e.labelAtIndex(i)
    dim value as string = e.valueAtIndex(i)
    
// show label and value for this entry
    MsgBox str(i)+": "+label+", "+value

// is it home?
    if label = a.kABEmailHomeLabel then
      MsgBox "Home: "+value
    end if
    
  next
  
It lists all your email addresses and if the label matches the email home 
label, you found the home email address.

Greetings
Christian

-- 
See you in Orlando, Florida for Real World 2012

More details and registration here:
http://www.realsoftware.com/community/realworld.php



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

Reply via email to