Jump to content

Recommended Posts

Posted

Has anyone already had this problem? I'm trying to export the outlook calendar in ICS format, but I would like to narrow the search by date to the end of April. it doesn't work, no appointment returns. If I don't restrict by date it returns all the calendar. Can anyone help me ?

#include <OutlookTools.au3>
#include <array.au3>

Global $oOutlook = _OL_Open()
Global $aFolder = _OL_FolderAccess($oOutlook, "", $olFolderCalendar)
; Export all appointments with subject "" as ICS files
Global $aAppointments = _OL_ItemFind($oOutlook, $aFolder[1], $olAppointment, "[Start]='2020-04-01 00:00' And [End]='2020-04-30 23:59'", "Location", "ProgAutoit", "EntryID", "", 1)
If @error Then MsgBox(48, "", "Error finding an appointment. @error = " & @error & ", @extended: " & @extended)
Global $iTimer = TimerInit()
Global $iItemCount = _OLT_Export($oOutlook, $aAppointments, $iOLT_ExportTypeICS, @ScriptDir & "\Export\", "", False, "", $iOLT_DebugConsole)
if @error then MsgBox(48, "", "Error exporting items. @error = " & @error & ", @extended: " & @extended)
MsgBox(0, "_OLT_Export", $iItemCount & " appointments exported as ICS." & @CRLF & "Time: " & Stringformat("%.2f seconds", TimerDiff($iTimer)/1000))
Exit

 

:rolleyes:

Posted (edited)

Can you please try the following date/time format: YYYY/MM/DD HH:MM

Edited by water

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

 

Posted

If you want to retrieve all appointments that start and end in April you need to modify the query:

"[Start]>='2020-04-01 00:00' And [End]<='2020-04-30 23:59'"

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

 

Posted

:)

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

 

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
×
×
  • Create New...