Jump to content
VishnuNair

Outlook Calendar Items

Recommended Posts

VishnuNair

Hello,

I am new to AutoIt and am working on script which can check the outlook calendar for a given time slot and give an output if that slot is free or not. If not list the appointments.

can this be done using the OutlookEX UDF? Please note i am using Outlook 2013

Please let me know.

Thanks,

Vishnu

 

Edited by VishnuNair

Share this post


Link to post
Share on other sites
water

Please have a look at function _OL_RecipientFreeBusyGet from the OutlookEX UDF.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
VishnuNair

Thanks Water. I will take a look at the OL_RecipientFreeBusyGet Function. Is this function intended only for the recipient or also for the sender? Meanwhile I have written a script using the OL_AppointmentGet function. I am not sure what is wrong here. The $appt never gives any value. Can you please help?

 

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Button1
            $StartDate = GUICtrlRead($Inputdt1)
            $StartTime = GUICtrlRead($Inputtm1)
            $EndDate = GUICtrlRead($Inputdt2)
            $EndTime = GUICtrlRead($Inputtm2)


            $Appt = _OL_AppointmentGet($OOutlook, $Path, $StartDate, $StartTime)
            If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_FolderAccess Example Script", "Error accessing the default contacts folder. @error = " & @error)

            MsgBox(0x40000000, 0,'get appointment ' &$Appt)
        _OL_Close($oOutlook)
    EndSwitch
WEnd

Edited by VishnuNair

Share this post


Link to post
Share on other sites
water

The function returns a one based two-dimensional array. That's why MsgBox doesn't work. Use _ArrayDisplay instead.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
water

_OL_RecipientFreeBusyGet function. Is this function intended only for the recipient or also for the sender?

Call the function for all people who should attend the meeting. Then check the results for a free time.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
VishnuNair

Thank you Water. I used the _OL_RecipientFreeBusyGet function in the following code and attached is the result.

 

 

While 1
    Global $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

        Case $Button1
            Global $StartDate = GUICtrlRead($Inputdt1)
            Global $StartTime = GUICtrlRead($Inputtm1)
            Global $EndDate = GUICtrlRead($Inputdt2)
            Global $EndTime = GUICtrlRead($Inputtm2)


          Global $Appt = _OL_RecipientFreeBusyGet($OOutlook, $Path, $StartDate, $iMinPerChar, $bCompleteFormat)

            MsgBox(0x40000000, 0,'get appointment ' &$Appt)
        _OL_Close($oOutlook)
    EndSwitch
WEnd

 

I am unable to interpret the results as it only gives 0's or 1's. I found that 0 character stands for Free and 1 for Tentative.My question is from what period to what period is this calculation done?

Can you please help me here?

Thanks,

Vishnu

 

Capture.PNG

Edited by VishnuNair
edit

Share this post


Link to post
Share on other sites
water

According to the docu in the UDF:
"The default is to return a string representing one month of free/busy information."


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
VishnuNair

Wow!! One month that is a lot.

Is there anyway i can use the same script to return the value for a specific time frame for example 26th August 2015 @ 8:00 am?

Is this possible? Or use some other function?

Share this post


Link to post
Share on other sites
water

You can only specify the start date/time plus the granularity (means the number of minutes each returned character stands for).
For examples please check _OL_RecipientFreeBusyGet.au3


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites
VishnuNair

Thank you very much Water. I used the function and it worked fine :)

Thank you very much..Have a great day!!

Share this post


Link to post
Share on other sites
water

:)


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
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

    • water
      By water
      Extensive library to control and manipulate Microsoft Outlook.
      Theads: Development - General Help & Support - Example Scripts - Wiki
      BTW: If you like this UDF please click the "I like this" button. This tells me where to next put my development effort

      KNOWN BUGS (last changed: 2018-01-26)
      None
    • Gowrisankar
      By Gowrisankar
      Dear members,
      I'm trying to get the attachments from mails using OutlookEx UDF and then save them in a particular location.
      The UDF considers even the signature images and other images in the mail body as attachments, and saves it in the folder I point. I want only the proper attachment documents to be saved.
      Requesting the guidance of the forum members.
       
       
      Thanks and regards,
      Gowrisankar R.
    • Gowrisankar
      By Gowrisankar
      Dear members,
      I'm trying to move unread mails from Inbox to a different folder using OutlookEx UDF.
      But its not working for me. I'm not sure what mistake I do.
      I get the error code 6 when the following is executed. From the UDF it is observed that  "No or an invalid item has been specified".
      Note : The UDF version is 1.3.3.1. AutoIt version (v3.3.14.2).
      #include <OutlookEX.au3> Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) Global $aOL_Item = _OL_ItemFind($oOutlook, "*\Inbox", $olMail, "[UnRead]=True", "", "", "Subject", "", 1) If $aOL_Item[0][0] = 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemMove Example Script", "Could not find a task item in folder 'Outlook-UDF-Test\SourceFolder\Tasks'. @error = " & @error) _ArrayDisplay($aOL_Item, "OutlookEX UDF: _OL_ItemFind Example Script - Unread mails") _OL_ItemMove($oOutlook, $aOL_Item[1][0], Default, "*\Outlook-UDF-Test\TargetFolder\Mail") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemMove Example Script", "Error moving specified task. @error = " & @error) Any help is deeply appreciated. Thanks in advance.
      Thanks and regards,
      Gowrisankar R.
×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.