#include <C:\Users\liam.welsh\Desktop\AutoIT\Outlook Prop\OutlookEX.au3>
#include <array.au3>
Global $oOutlook = _OL_Open()
If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended)
$aFolder = _OL_FolderAccess($oOutlook, "", $olFolderToDo)
Global $sFilter = "@SQL=" & Chr(34) & "http://schemas.microsoft.com/mapi/proptag/0x0E2B0003" & Chr(34) & " = 1"
Global $aResult = _OL_ItemSearch($oOutlook, $aFolder[1], $sFilter, "EntryId,Subject,Categories")
Global $aItems = _OL_ItemFind($oOutlook, $aFolder[1], $olTask, "", "", "", "Subject,Body")
dim $aResults[1]
$aresults[0] = $aItems[0][0] + $AResult[0][0]
$i = 0
If IsArray($aItems) And IsArray($aResult) Then
Do
$i = $i+1
_arrayadd($aResults,$aItems[$i][0])
until $i = $aItems[0][0]
$i=0
Do
$i = $i+1
_arrayadd($aResults,$aResult[$i][1])
until $i = $aResult[0][0]
_Arraydisplay($aResults, "MarkedAsTask")
Else
MsgBox(16, "Alfred", "Error running Task Search")
EndIf
_OL_Close($oOutlook)
Amazing! You are a genius!
I have manipulated the code a little in order to combine to the 2 (as one returned created tasks and the other returns flagged emails)
I have attached it for no real reason other than someone reading it and offering me advice (or getting something from it)
One more question, which is probably an obvious one one, how would i filter it so that only tasks that have not been completed come through?
Thank you water! you have been an amazing help,
Keep up the good work mate, i love all your UDF's and a lot of your posts across the forum have benefited me!
Liam