VBA/Outlook syntact problem

  • Thread starter Kevin w/Contact properties question
  • 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
 
K

Kevin

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

Thanks,

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top