VBA/Outlook syntact problem

  • Thread starter Thread starter Kevin w/Contact properties question
  • Start date Start date
K

Kevin w/Contact properties question

I want to use a string variable to retrieve a value from a
contact property (with the same name as the variable) and
am getting a syntax error. Here is the abbreviated code I
am using:

Set olns = ol.GetNamespace("MAPI")
Set cf = olns.GetDefaultFolder(olFolderContacts)
Set objItems = cf.Items
strfld = "FullName"
' get first item in MS Outlook Contact folders
Set c = objItems.getfirst
strName = c(strfld) ' gives me a syntax error

Can anyone tell me what I am doing wrong. Would be
greatly appreciated.

Thanks,

Kevin
 
Thank you. I Have Outlook 2000 so I guess it is
impossible. I will check out the link.

Thanks,

Kevin
 
Back
Top