locked
Calling ExchangeWS from MS Access RRS feed

  • Question

  • Has anyone here used ExchangeWS for Office365 from within Access?  (For the record, I first posted this question posted to an Exchange Developers' forum but have not gotten any useful responses yet.)

    We originally had an on-premises Exchange 2010 server. On our Shoretel phone/voicemail server was a small application that used ExchangeWS to extract contacts from an Exchange public contact list and saved it as a .csv file, from whence a Shoretel process imported it for use within the Shoretel client. I assume it was using ExchangeWS because I see a file named Microsoft.Exchange.WebServices.dll in the same folder. The XML configuration file for that process also gives some clue as to how that application calls the ExchangeWS API:

    <xml>
      <Contacts>
    <Exchange>
      <!-- Exchange Server version 0 for Exchange server 2007 and 1 for 2010-->
      <Version>1</Version>
      <!-- Required if not using network credentials-->
      <UserName>OurExchangeAdminName</UserName>
      <Password>OurAdminPassword</Password>
      <Domain>OurDomainName.com</Domain>
      <PageSize>1000</PageSize>
      <!-- Specify the path of Exchange Server-->
      <EWSUrl>https://OnPremExchangeServerIPAddress/EWS/exchange.asmx</EWSUrl>
      <!--Public folder to fetch, specify relative path-->
      <PF>ThePublicFolderWeWantToQuery</PF>
    </Exchange>
    <OptionalColumns>ImUri,ContactDetails</OptionalColumns>
    <LogFile>ImportPublicContacts.log</LogFile>
    <CSVFile>ImportPublicContacts.csv</CSVFile>
      </Contacts>
    </xml>

    That application is apparently specific to public folders, and I suspect that ExchangeWS itself does not impose this limitation.

    Now that we have moved to Office 365, public folders no longer exist, and the required contacts have been moved to a contact list within a shared mailbox. But no amount of guessing how it might work would allow the process above to work, so it seems I have to start from scratch and write my own app. I just need some clue how to use ExchangeWS to automate the process of getting the data out of the contact list of that shared mailbox contact into a CSV file.

    I have 20+ years programming in Access, including a number of API integrations, but I so rarely have to go looking at new API's that each one is a mystery to me for the first few hours, so there is always some head-scratching involved, and that is where I am with this one.

    So, yes, I am also off to look for an ExchangeWS developers' manual, but even if/when I find that, I am likely to need at least a clue as to how to use it in VBA and how accessing Office365 differs from accessing local Exchange server.


    Tuesday, September 22, 2020 8:00 PM