Jump to content

outlook udf

Recommended Posts


I am trying to access the inbox in my outlook. I have 2 inbox. One is associated to my name. Another one is shared inbox between 3. I am able to read/write emails on both the inbox.

I am using the following code

#include <OutlookEX.au3>

Global $oOutlook = _OL_Open()
Global $aFolder = _OL_FolderAccess($oOutlook, "\\Expense Reports\Inbox", Default, Default)
If @error Then
    MsgBox(0, "Error", "Error Accessing Inbox:  " & ":" & @error, 5)
    MsgBox(0, "Success", "Success Accessing  " , 5)

it gives me the error code 1.

Instead of "\\Expense Reports\Inbox" if i use "*" which points to my inbox it works.

I have access to the folder \\Expense Reports\Inbox. I can read/write the emails from that folder.

Any help ....... :)

Also if i change "*" to "\\angamuthus@xxxx.co" which is my actual root folder. I still get the error 3: Error accessing specified folder.


Can some throw some light on this......

Edited by Happy82

Share this post

Link to post
Share on other sites

I have added a section to the wiki that explains how to access folder items. 

I'm on vacation right now so I might be a bit slow in answering further questions 😬

My UDFs and Tutorials:


Active Directory (NEW 2018-12-03 - Version - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

ADO - Wiki


Share this post

Link to post
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

  • Similar Content

    • Blois
      By Blois
      Hello guys,
      I'm having a problem reading Outlook when I use #RequireAdmin, as far as I understand it, it can not read the Outlook Profile that is configured from the user running the application.
      I need to run some parameters with #RequireAdmin after it reads Outlook.
      $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_Open", "Example Error" & ". @error = " & @error & ", @extended = " & @extended) This retunr is @Error=1
      Can you help me?
    • caramen
      By caramen
      @water Tips please ? 
      I whould like to check a mail box. Check each mails that is coming and also 'Do' if a particular tag is in the mail subject. 
      Well i know I am gonna use 'RegExp' with '_OL_MailheaderGet' from the outlook UDF
      And i already tryed them. But when i tryed '_OL_MailheaderGet' If i use the patterne [0] I will get the first mail received. 
      Any way to get the last mail received header ? without doing an UBound (may i ll have somthing like 500 mails to unbound...) ? 
      Or i am using the function wrong ?
    • water
      By water
      My computer has been upgraded from Office 2010 to Office 2016.
      Are there any features of Office 2013 or Office 2016 which you now want to see in the Excel, Word or Outlook UDF?