Jump to content

Outlook exchange calendar


Jewtus
 Share

Recommended Posts

I'm trying to find out if there is a way of grabbing the data from a microsoft exchange contact list. I've been looking at the OutlookEX 1.0 UDF (I think water is the author) but I honestly have no idea what I'm looking at or how to really use it.

Can someone point me in the right direction? I'm trying to grab the entire address book and just dump it into a SQLite DB.

Link to comment
Share on other sites

  • Moderators

First off, a little confusing when your title references an Exchange calendar but your question is about contacts...

If you read through the examples for >OutlookEX, you will see an example for grabbing contacts under _OL_ItemFind.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

I don't actually know much about outlook stuff, which is why I ask.

When I open the "address book" it has a dropdown for different address lists. The primary is "Global Address List - Cloudmail".

I did try messing around with the outlookEX UDF. This is the script I tried to run to see how it works:

#AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y

#include 'C:\OutlookEX 1.0.0.0\OutlookEX.au3'

; *****************************************************************************
; Create test environment
; *****************************************************************************
Global $oOutlook = _OL_Open()
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended)
Global $Result = _OL_TestEnvironmentCreate($oOutlook)
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF - Manage Test Environment", "Error creating the test environment. @error = " & @error & ", @extended = " & @extended)
Global $aItems

$aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test\SourceFolder\Contacts", $olContact, '[FirstName] = "TestFirstName"', "", "", "", "", 1)
If @error = 0 Then
    _ArrayDisplay($aItems, "OutlookEX UDF: _OL_ItemFind Example Script - Find contacts by firstname")
Else
    MsgBox(48, "OutlookEX UDF: _OL_ItemFind Example Script", "Error finding a contact. @error = " & @error & ", @extended: " & @extended)
EndIf

But I get the following error in the console output

 

"C:OutlookEX 1.0.0.0OutlookEX.au3" (1275) : ==> The requested action with this object has failed.:

$oFolder = $oFolder.Folders($aFolders[$iIndex])
$oFolder = $oFolder^ ERROR

 

I honestly have no idea how the outlook stuff works (other than sending emails with COM objects). 

Hopefully that reduces the confusion from my OP.

Link to comment
Share on other sites

  • Moderators

I honestly have no idea how the outlook stuff works

 

You say this a couple of times; this is why Water provided very good documentation. Try reading it, parameter by parameter, rather than just copying his Example over. Use the path to your contacts folder in your Outlook.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

I have no contacts folder in outlook. Everything is pulled from a microsoft exchange server (which is more than just the calender). The way the machines here are configured, nothing is stored on the local machine except for downloaded emails, and even those are encrypted when you are not on the right domain or VPNed. So when you say use my contacts folder, that is not on my local machine, its on the server, which I do not have access to.

I'm trying to find a way to dump the contacts from the exchange into a local file BECAUSE it doesn't create locally (non of the files that exist in the drive:Documents and Settings<user>Local SettingsApplication DataMicrosoftOutlook fit the mold). That is why I don't think that the utility that water build will work for my plan and I was looking for additional input and not for someone to say read the document... I have, many times... it doesn't work for the configuration I have. If I cannot extract from the exchange server (since I don't have local files) I will need to build an extractor that goes to the web based version of the exchange address book and extract them 1 by 1 from the web portal. That is why I posted this thread.

Link to comment
Share on other sites

Outlook accesses data stored on the Exchange server either as contact folders or as address lists. Usually there is no need for Outlook to store any data (beside the profile) on the local disk. Outlook is just a GUI displaying data retrieved from the Exchange server.

To narrow down what you want to process could you please run _OL_AddressListGet.au3 and tell us which (if any) of the address list items displayed you want to export?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Thanks water,

I tried the _OL_AddressListGet

Global $oOutlook = _OL_Open()
$aResult = _OL_AddressListGet($oOutlook, False)
_ArrayDisplay($aResult)

Which does pop up an array that shows the different address books. There are 38 different address books, but the one I'm interested in is the one that shows up on the list first (below the counts and its called Global Address List).

So I tried to use 

Global $oOutlook = _OL_Open()
Global $aResult = _OL_AddressListGet($oOutlook, False)
$aResult2 = _OL_AddressListMemberGet($oOutlook, $aResult[1][2])
_ArrayDisplay($aResult)
_ArrayDisplay($aResult2)

and when I execute, it works (takes quite a while because there are more than 200,000 names in the library).

That is what I needed to get started. I should be able to figure it out from here. Thanks water!

Link to comment
Share on other sites

:)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...