List Contacts in Each Contact Folder

Hi,
When I open OUTLOOK 2013 and click on "People" I have a "My Contacts" and under it a folder named Contacts.  Today I added a new folder name "Test" under Contacts and created several new contacts in this folder.
I am trying to create a VBA procedure to list all Contact folders and all contacts in each folder.   Here is a simplified version of the code:
Sub GetContacts()
Dim objOutlook As Outlook.Application
Dim objAddressBook As Outlook.AddressList
Dim objAddressEntry As Outlook.AddressEntry
Dim lngRow As Long
Set objOutlook = CreateObject("Outlook.Application")
For Each objAddressBook In objOutlook.Session.AddressLists
Debug.Print objAddressBook.Name
'Msgbox objAddressBook.AddressEntries.Count For Each objAddressEntry In objAddressBook.AddressEntries
Debug.Print objAddressEntry.Name
Debug.Print objAddressEntry.Address
Next
Next
End Sub
Result:  Both contact folder names (Contacts and Test) are listed.  All contacts in the contact folder "Contacts" are listed, but none of the contacts in the contact folder "Test" are listed. 
If I unset the Msgbox line the "Contact" folder count reports accurately 66 contacts.  However even though I clearly have several contacts defined in the "Test" folder the count returned is 0.
What could I be doing wrong?  Thanks
Greg Maxey Please visit my website at: http://gregmaxey.mvps.org/word_tips.htm

Hi Greg Maxey,
>>the address book is there, but the Address List Entries are not.  This sort of explains why the code isn't returning the Address List entries, but not why the address list entries are not in the book!<<
Based on my test, if I created a contact without email address, the contact won't display in the Address book. Here is the figure for your reference:
The
AddressEntry object is an address in an AddressEntries object. Each
AddressEntry object in the AddressEntries object holds information that represents a person, group,  or public folder to which the messaging system can deliver messages.
Based on my understanding, if there is no email address for the contact, this is expected that there is no addressEntry for it.
Please feel free to let me know if I misunderstood.
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Third party application can list contacts from shared contacts folder, but not retrieve

    I am working with a third party developer on a problem occurring in their application.<o:p></o:p>
    The software displays the contact list and retrieves a fax number from Outlook. I wish to
    return a number from an Outlook Shared Contacts Folder.
    This works well under Windows 7 with Outlook 2013 in cached mode..<o:p></o:p>
    Running the same software in a terminal services window on a Remote Desktop Server running
    Server 2008 R2 with Outlook in Online mode an error is produced when trying to
    do the same. The contact list is shown, but when the code tries to retrieve the
    displayed record there is the following error:<o:p></o:p>
    x664bc8bcf689f252.x36f18e7b3c08fff5()
    System.Runtime.InteropServices.COMException (0x80040201): The operation failed.
    at Microsoft.Office.Interop.Outlook.AddressEntry.GetContact()
    at Zetadocs.Outlook.OM.x664bc8bcf689f252.x36f18e7b3c08fff5()<o:p></o:p>
    If I open Outlook myself first, browse to People and click on the Shared Contacts Folder,
    then run the application, there is no error and everything works fine. It is as
    if starting Outlook from code is not loading all contact folder information.<o:p></o:p>
    Have you any suggestions on what may be causing this to happen and if I can do anything to cure this?<o:p></o:p>

    Sorry to be away from this for so long.
    It looks like Outlook is not initializing shared folders when it starts.
    I confirmed this using the following code for the Outlook startup event:
    Private Sub Application_Startup()
        Dim olApp As Outlook.Application
        Dim nspNameSpace As Outlook.NameSpace
        Dim objTempFolder As Outlook.MAPIFolder
        Set olApp = ThisOutlookSession.Application
        Set nspNameSpace = olApp.GetNamespace("MAPI")
        For Each objTempFolder In nspNameSpace.Folders
        Next objTempFolder
    End Sub
    With this in place I do not need to go to People and click the shared folder, and the third party app has no problems retrieving.
    The third party app starts Outlook itself if it is not already running. In this scenario no events fire.
    So the question is: Is there a means of executing this code when the third party app starts Outlook?

  • While I'm addressing an email to several of my contacts, is it possible to keep the contacts folder up on the screen instead of calling it up for each individual person I wish to send the email to?

    While I'm addressing an email to several of my contacts, is it possible to keep the contacts folder up on the screen instead of calling it up for each individual person I wish to send the email to?

    Thanks for your help. On my own, I also discovered that in "mail" I could go to the menu bar and "window" and down to "address panel" which brought on screen and from there able to drag and drop addresses. As stated, I am a Mac "Newbie" and appreciate your help.

  • Contacts "selected groups" doesn't list main contacts folder

    I want to sync my main contacts folder as well as 2 out of 5 sub folders.
    When I select "Selected Groups" however, I can only select sub folders, not the main folder...
    So... How do I get my main contacts folder to sync with my iPhone?
    Thanks!

    Anyone, Anyone? Bueller?
    Any assistance would be appreciated...

  • 'Contacts' folder with sub folder cannot be removed after synching via iTunes

    'Contacts' folder with sub folder cannot be removed after synching via iTunes
    I am trying to remove a 'Contacts' subfolder
    ie Contacts < default folder
    - Contacts Mysubfolder 1 < Trying to remove this subfolder folder
    via my microsoft outlook onto my iPhone.
    Despite not having 'Contacts Mysubfolder 1' on my PC's outlook after deleting it, it does not delete the subfolder in my iPhone.
    I even restored my iPhone settings to the original via iTunes.
    I also replaced my physical iPhone but still synching with my original Apple ID + iTunes on the same desktop.
    All I did was after replacement of my iP, i setup my microsoft Exchange account, and there it was, the Contacts subfolder which is no longer around, appears on my iPhone contacts folder list.
    My outlook is on Microsoft exchange and I am on iP 3Gs
    Please help
    Thank you

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    If you are running 64-bit Windows and the above steps haven't helped try installing the version of iTunes that can be downloaded from this support document. iTunes 12.1 for Windows (64-bit — for older video cards)
    If you still have no luck try reinstalling iTunes 12.0, links in the user tip.
    tt2

  • How do I use Active Sync to view SharePoint Lists (Contacts and Calendars) on a Mobile Phone?

    We are attempting to use SharePoint 2010 in combination with Exchange 2010 to implement shared calendars and contact lists throughout our organization.  We are able to connect the lists to Outlook 2010, but have been unsuccessful in viewing
    the calendars and contact lists from our mobile phones.  How do we use Active Sync to view SharePoint Lists (Contacts and Calendars) on a Mobile Phone?
    In trying to answer this question, we have come across a few different possibilities, all of them falling just short of a long term solution for us.  After doing research, we found that Active Sync will only show the default folders of the account.  To
    solve this, we downloaded an Add-In for Outlook (CodeTwo FolderSync) to synchronize folders and synchronized our SharePoint list with a new Contact list in the default folder.  The issue we came across with this method is that the Add-In we are using
    is not capable of automatic synchronization.  There is a button and it must be clicked after every update is made, which is not ideal for our solution.  We then went to the company (CodeTwo) and found server side software (Exchange Sync) that they
    offer which will automatically synchronize the folders.  After installing that on the Exchange Server, we now are running into the issue of not being able to locate the SharePoint lists on the Exchange Server.
    Does anyone happen to know how we can get to the SharePoint lists from the Exchange Server?  Has anyone else been able to use shared contacts lists and calendars from SharePoint on their mobile phones using Active Sync?  If so, are we in the right
    direction with what we have found so far?
    Thanks,
    Brad

    You cannot use ActiveSync for that, but there are SharePoint clients for the iPhone. Windows Mobile 7 natively supports SharePoint with SharePoint Workspace Mobile, part of Microsoft Office Mobile. Android and BlackBerry might also have some apps.
    Use Microsoft SharePoint Workspace Mobile
    http://www.microsoft.com/windowsphone/en-us/howto/wp7/office/use-office-sharepoint-workspace-mobile.aspx
    iPhone SharePoint Apps Shootout
    http://www.codeproject.com/KB/iPhone/iPhoneSharePointApps.aspx 
    Comparing SharePoint iPhone Apps
    http://blog.praecipio.com/2010/11/02/comparing-sharepoint-iphone-apps/
    MCTS: Messaging | MCSE: S+M

  • How can I synch ONLY the default 'contacts' folder in Outlook 2003?

    I am using Outlook 2003 SP3. In my 'contacts' menu I have 3 folders: 'Contacts', 'iPhone' and 'Old.' I created 'iPhone' and 'Old' folders and 'Contacts' was the default folder. When I synch my 3G iPhone with Outlook I want to synch ONLY the default 'contacts' folder. But I can't seem to do this. My options are to synch all folders or a selection of non-default folders (i.e., anything but 'Contacts.')
    Does this make sense? I don't want to synch anything in the 'old' folder to my iphone. But I also don't want to move all of my current contacts to a special folder just so I can synch only these items.
    So when I synch my iPhone I want it to limit the synching to only the default 'contacts' folder.
    Is there a way to do this?

    Open one of the folders that keeps changing. Set it to the view mode you prefer. Press Command-J (Show View Options in View menu).
    At the top of the View Options screen is an item which allows one to set "Always open in xxx view". Chekmark that.
    Repeat for each folder you want.
    This is a per-folder setting. Note that the View Options screen is 'live" - you can leave it open, and as you open successive folders it will display the settings for each in turn.

  • Make icloud contacts the default contact folder in outlook 2007

    Recently Outlook 2007 Contacts defaulted to the Contacts folder under My Contacts instead of the Contacts in iCloud folder under iCloud.  The iCloud folder is at the top of list but Outlook does not default to it when I open Outlook 2007.  How do I change the default folder that opens when I start Outlook 2007?
    Here's what I see.
    CONTACTS
    All Contact Items
    (Drop Down Menu)
        Search these date files
              Personal Folders
              Archive Folders
              iCloud (check marked)
              [email protected]
    iCLOUD
         Contacts in iCloud (I want Outlook to default to this folder)
    My Contacts
         Contacts (this is the default folder when Outlook opens that I can't change)

    Set Contact Defaults.Outlook for Windows

  • How to assign the iCloud/Contacts folder as an Adress Book in Outlook 2013?

    I just Installed Office 2013
    In the old Outlook 2010 I was able to use the Icloud Contacts as my Address Book.
    In Outlook 2013 the option in iCloud/Contacts/Properties/Outlook Address Bookk is dimmed.
    How to assign the iCloud/Contacts folder as an Adress Book in Outlook 2013?

    Hi,
    For more methods of making Shared Contacts available as an Address Book, you can refer to the following articles:
    http://social.technet.microsoft.com/Forums/en-US/9d20ffad-d49a-4aa3-8d49-c63b8d4583ee/adding-shared-contacts-to-the-address-book-without-public-folders-in-outlook-2010?forum=outlook
    Add shared Contacts folder as Address Book list:
    http://www.msoutlook.info/question/614
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Hope it can help you.
    Thanks,
    Angela
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Iphone 4 Sprint contacts folder.

    Today my personal contacts are not displayed in the Contacts folder. When I send a text or email the first letters search through the normal contacts list. Therefore, I have not lost the contact list but it is not displayed in the folder.

    i had the same issue!
    what i did i did a hard rebootby  holding down the home button and power button at the same time and then u will see the apple logo
    if you do, do this it will take longer then usual to boot up and it should fix your issue. thats how i fixed mine
    last choice is to restore

  • Double Contacts Folder after Mailbox Migration

    Here’s a new one for you… I’ve done a few Exchange 2007/2010 to 2013 migrations so far, and to my knowledge they’ve been successful… until now…
    I migrated my own server from 2007 to 2013 over the weekend.  Mailbox migration finished early Tuesday morning my time (Monday was a public holiday).  Everything seemed to work just fine.
    Yesterday (Tuesday) I noticed on my Win8.1 phone, that a large number of my contacts were missing.  Digging deeper I found that my phone was missing the contacts from my main mailbox.  I checked my iPad to see if the contacts were there – they
    were!  I figured somethings up with my Win8.1 phone, so I removed the account and readded it – same problem.  I added a user to the contacts on my Win8.1 phone and sync’d it.  It showed up in the iPad no problems. 
    I then went to Outlook and switched the pane to Folder View – I could then see two contacts folder both at the root of my mailbox.  The test user was in the first folder.  If I try to expand the 2<sup>nd</sup> folder, it sends outlook
    into a massive loop and flickers between the two folders as if they are fighting one on one…
    If however I switch the view to People – I see the two contacts folders as just fine and can look into each of them.  In one of them I can see the Testuser.  In the other folder I can see all my other contacts that are "missing"
    But wait… it gets better still.  In our office several months back, we migrated from Exchange 2010 to 2013.  I wondered if others had seen the problem.  From what I can see today, it appears that anyone with a Windows 8 phone has this duplicated
    contacts folder. They appear to have the exact same problem… right down to the flickering and crash of Outlook 2013…
    I'm concerned now because this is now a couple of migrations that we've seen this on and I've no idea whats gone wrong.
    I've checked event logs - nothing seems amiss there.
    Any thoughts on how to troubleshoot this?
    Wayne
    Wayne Small

    Hi Wayne,
    I have seen this issue if original mailbox was in different language than the new mailbox.I have even seen this even if original mailbox had EN-US and new database is EN-UK.
    Please run the following command in Exchange powershell:
    Get-MailboxFolderStatistics [email protected] | Select Name,FolderSize,ItemsinFolder
    Do you see two contact folder here aswell?
    Solution for us it to copy all "old Contacts" to new Contact and delete the old one.When try to delete the default Contact you will get error message that it cant be removed.
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. That will encourage me - and others - to take time out to help you. Thank you! Off2work

  • How to list contact or user in a Group especial in DL by command-line?

    I know some commands can list contacts or users in a OU such as
    squery user OU-DN
    OR
    dsquery contact OU-DN
    list a group and mark with SecGroup or DL can use by:
    dsquery group OU-DN | dsget group -dn -secgrp
    and list all members of a group by:
    dsget group GroupDN -members
    But the list cannot tell me who are contacts and who are users.
    Are there any ways can check which members of Group are contacts or users in command-line?
    Thanks

    This isn't pretty, but it works:
    dsquery * -filter "(memberOf=cn=Mygroup,ou=Sales,dc=MyDomain,dc=com)" -attr distinguishedName objectClass
    The objectClass attribute indicates whether each member is a user, contact, group, or computer.
    Richard Mueller
    MVP ADSI

  • In the contacts folder, the favorites, how do you rearrange them? Say bring the bottom one to the top?

    In the contacts folder, fovorites, how do you rearrange them? Say bring the bottom one to the top.

    Hello ... and thanks for  your response.   But I have discovered a couple problems.  And I am sure it is "operator error"
    I used your method #1.  The first window that popped up stated that it was making a temporary copy of the catalog.  This took about 20 minutes.
    Next, the window showed thumbnail photos on the right and a list of folders in my catalog on the left. The catalog contains folders stored on my LapTop, as well as my external hard drive. 
    There appeared to be a distinctive difference between those photo folders stored on the external hard drive and those on my LapTop.   The folders on the external drive were named as I have all my folders named: Date_CustomName.  The folders stored on my LapTop were named as: Lightroom_5 Backup_Date_CustomName or some such combination and my memory is foggy on the actual use of underscore, slash marks, dashes, etc. 
    I searched the list closely, and the Folders without a reference to "Lightroom Backup" were not showing.  
    So as a test, I "added" to the new Catalog one folder from the external hard drive and two from the LapTop.   After the transfer, the new Catalog had accurately named my external hard drive and the folder within in and the photos and their edits transferred accurately.   The other two folders were not named but listed shown in the library module as grey boxes as images with indications of editing.  But when I clicked on it, there was a notation that popped up that the file could not be found. 
    Any ideas? 
    I am going to create a second new catalog and try your option #2 now.  
    Thanks

  • People application and contacts folder

    Hello,
    I want to know if it's possible to have the contacts from the contacts folder appear in people application and in mail application. I have them in windows live mail.
    I tried adding a Microsoft account to the list of accounts (skype and google) but it does not appear in the selection box!
    Thank you!

    Hi cristi1010,
    Could you please explain a bit about the sentence ‘I tried adding a Microsoft account to the list of accounts (skype and google) but it does not appear in the selection box!’?
    If my understanding is right, you want to import the contacts from contacts folder to people and mail app.
    Please take the following steps to implement this function:
    1. Export the Windows Contacts as .csv file.
    2. Go to https://people.live.com/ and select import from outlook.com
    3. Finally, we could add the contacts to people.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • Importing a contact folder from external hard drive onto new iphone

    It is kind of a long story...my mom was updating iphone on computer when computer crashed. iphone crashed. had friend move all info from crashed computer onto external hard drive. got new iphone.
    so, she no longer has a computer and we have to share mine. she has her own itunes on an external drive and i have my own itunes on another hard drive. i got almost everything except the contacts moved back on her phone. i see the folder and contacts in a 'contact' folder on the external hard drive, but how do I move that to the new iphone without it being in outlook/google/yahoo. i tried 'adding folder' to the library containing the contacts, but that didn't work.
    any suggestions? thanks!!!

    thanks for the advise about the two users. so, i did that. but, now cannot seem to import the contact folder into the Address Book. the files in the 'contact'-hard drive are called CONTACT files (.contact). i don't know what that means. can i open those in the address book?

Maybe you are looking for

  • User Exit to stop the creation of PO

    Dear All, I have a typical problem , we have 2 servers both running on ECC 6.0. I tried creating a PO and I kept a break point in the exit EXIT_SAPMM06E_013 (INCLUDE ZXM06U44 ) in server1 and the control stops here and I can check all the values from

  • Cannot download drivers for the HP office jet 4635

    I cannot find and download drivers for my MAC.  On verious support pages for downloading drivers, I enter the procuct name "HP officejet 4635" and enter and only blank pages come up and I cannot continue.  It's a new printer and I am about to return

  • OID Authorization issue

    Hi all, I need some help to setup LDAP Authentication. I configured the AuthProvider, I can see the OID Users and Groups within myrealm->Users and Groups tab. I can also see the groups defined within the ADF Application which is deployed to the manag

  • Coldfusion 9 & Oracle 11g r1 connection

    We recently updated to Coldfusion 9. We are wondering how we can get an odbc connection to oracle 11g r1. I did a full installation of CF 9 with the ODBC option checked but it did not have an option for oracle databases, when we went to the data sour

  • Accout group of a vendor

    Hello, I want to change the account group and the code of a vendor How could I do it?? Thank you very much