How to get a list of Outlook Contacts in my MS-Word VSTO Project? RRS feed

  • Question

  • Hi,
    I am trying to use this function ( in my VSTO Project (Visual Studio 2017 and Office 365).
    I would like to call the function from MS-Word via a Ribbon Toolbar to get a List of Outlook contacts from my local MS-Outlook contacts Folder.
    (Later on I would like to insert the address data to my Word-Document..)

    Unfortunatelly I get some errors if I use your solution:

    First I added "Microsoft.Office.Interop." before each Outlook. - call because I got "Type Oulook.Items is not defined"..

    Then I made the function public not private

    Now If I call the function in my Ribbon.vb:
    I get "olFoldersuggestedContacts is cannot be converted to MAPI folder"..
    Any ideas?



    Tuesday, January 15, 2019 9:40 AM