Jump to content

OutlookEX UDF - Help & Support (IV)


Recommended Posts

4 hours ago, water said:

My bad :>
You know there is a typo in your code and your last post? It should be:  $oItem.GetInspector

What happens when you add a Sleep(500) into the loop before sending each mail?

With the last version of udf and sleep(500)...I have exactly the same error

Link to post
Share on other sites
  • Replies 492
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Fixed in version 1.3.3.1 of the UDF I uploaded today

I know I'm not Bill Murray, so I'm not a god  

As the OutlookEX UDF - Help & Support thread has grown too big, I'm starting a new one. The original thread can be found here.

Posted Images

We need more information now:

  • Which version of Windows do you run?
  • Which version of Outlook do you run?
  • Which version of AutoIt do you run?
  • Do you run Antivirus software?

BTW: The Getspector/GetInspector problem was caused by a Firefox addin :>

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites
23 minutes ago, water said:

We need more information now:

  • Which version of Windows do you run?
    windows 7 Pro
    version 6.1 (number 7600)
  • Which version of Outlook do you run?
    Oulook professionnal Plus 2010 version 14.0.7015.1000 (32bits)
  • Which version of AutoIt do you run?
    AutoIt V3
    version 3.3.14.2
  • Do you run Antivirus software?
    No it's a virtual machine only for dev and test

BTW: The Getspector/GetInspector problem was caused by a Firefox addin :>

 

Link to post
Share on other sites

What I see from post #15 is that you are sending the identical mail to 99 recipients.
Would it be possible to create a string of 99 recipients and then create a single mail?
If the recipients should be hidden you could use BCC.

BTW: The security popup gets generated because there is no AV software installed on the machine.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Something else to check:
When you get the MsgBox telling you "Error creating mail in folder @error=4,  @extended: -2147221005", before exiting the script, check the task manager if Outlook.exe is still running?
Maybe you got bitten by the Auto Shutdown of Outlook as described in the wiki.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites
On 05/01/2018 at 5:03 PM, water said:

What I see from post #15 is that you are sending the identical mail to 99 recipients.
Would it be possible to create a string of 99 recipients and then create a single mail?
If the recipients should be hidden you could use BCC.

BTW: The security popup gets generated because there is no AV software installed on the machine.

It's a test the mail will have attachment and body differents

Link to post
Share on other sites
On 05/01/2018 at 5:16 PM, water said:

Something else to check:
When you get the MsgBox telling you "Error creating mail in folder @error=4,  @extended: -2147221005", before exiting the script, check the task manager if Outlook.exe is still running?
Maybe you got bitten by the Auto Shutdown of Outlook as described in the wiki.

No Process Outlook.exe still running,

I go to test by laucnh and control outlook while the processing

Link to post
Share on other sites

Move the mail item variable to the main script. Maybe this helps:

Spoiler
#include <OutlookEX.au3>
Global $oItem
$oOutlook = _OL_Open()
If @error <> 0 Then Exit MsgBox(16, "AAA", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended)

$sBody="AA<br>bb"

For $i=0 To 99
    Creer_mail($oOutlook,$i & "a@a.com","Invoide s","C:\Users\vmware\Desktop\exporteur\3 Facturation\2017\201712\201712 - Facturation ddd - Synthese.pdf","C:\Users\vmware\Desktop\exporteur\3 Facturation\2017\201712\201712 - Facturation ddd.pdf",$sBody)
Next
_OL_Close($oOutlook)

Func Creer_mail($oOutlook,$email_destinataire,$sujet,$pj1,$pj2,$chem_modele_html)

    $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "", "", "Subject=" & $sujet, "BodyFormat=" & $olFormatHTML)
    If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate Example Script", "Error creating a mail in folder 'Outlook-UDF-Test\TargetFolder\Mail'. @error = " & @error & ", @extended = " & @extended)


    ; Add a recipient and resolve it
    If $email_destinataire<>"" Then
        _OL_ItemRecipientAdd($oOutlook, $oItem, Default, $olTo, $email_destinataire)
    EndIf

    ; Add all attachments
    If $pj1<>"" Then
        $oItem = _OL_ItemAttachmentAdd($oOutlook, $oItem, Default, $pj1)
        If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate Example Script", $pj1 & "Error adding an attachment to a mail in folder 'Outlook-UDF-Test\TargetFolder\Mail'. @error = "  & @error & ", @extended = " & @extended)
    EndIf

    If $pj2<>"" Then
        $oItem = _OL_ItemAttachmentAdd($oOutlook, $oItem, Default, $pj2)
        If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate Example Script", $pj2 & "Error adding an attachment to a mail in folder 'Outlook-UDF-Test\TargetFolder\Mail'. @error = "  & @error & ", @extended = " & @extended)
    EndIf

    $oItem.GetInspector
 
    $sBody =  $chem_modele_html
    $oItem.HTMLBody = $sBody

EndFunc

 

 

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites
  • 2 weeks later...

Version 1.3.3.0 of the UDF has been released.

Please test before using in production!

For download please see my signature.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Hey @water, I don't know if this should be posted here or somewhere else.

Anyway, I was trying to create a rule for all messages coming from <email> and move it to <folder> but after writing it, I kept seeing that the rule created was for all messages sent TO <email> move it to <folder>.

I checked the UDF and noticed the following part in function _OL_RuleConditionSet:

Func _OL_RuleConditionSet($oOL, $sStore, $sRuleName, $iRuleConditionType, $bEnabled = True, $bExceptions = False, $sP1 = "")
...
    Switch $iRuleConditionType
    ...
        Case $olConditionFrom, $olConditionSentTo ; ToOrFromRuleCondition object
            If $oRule.RuleType = $olRuleSend And $iRuleConditionType = $olConditionFrom Then Return SetError(6, 0, 0)
            If $iRuleConditionType = $olConditionFrom Then $oObject = $oConditionOrException.From
            If $iRuleConditionType = $olConditionFrom Then $oObject = $oConditionOrException.SentTo
...     
EndFunc   ;==>_OL_RuleConditionSet

These two lines:

 

If $iRuleConditionType = $olConditionFrom Then $oObject = $oConditionOrException.From
If $iRuleConditionType = $olConditionFrom Then $oObject = $oConditionOrException.SentTo

 

I don't know if this is an error or I am writing something wrong, but after removing the second line altogether the rule was created as intended.

Would you please check?

Thanks.

Link to post
Share on other sites

That seems to be a bug.
Do you get the expected results when you change the second line to:

If $iRuleConditionType = $olConditionSentTo Then $oObject = $oConditionOrException.SentTo

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

Fixed in version 1.3.3.1 of the UDF I uploaded today :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

How about this? Returns EntryID to directly access the item, the subject plus LastModificationTime (can easily be sorted):

#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)
$aFolder = _OL_FolderAccess($oOutlook, "", $olFolderToDo)

Global $aResult = _OL_ItemFind($oOutlook, $aFolder[1], $olTask, "", "", "", "EntryID,Subject,LastModificationTime")
If @error Then
    MsgBox(16, "OutlookEX UDF - _OL_ItemSearch Example Script", "Error running _OL_ItemSearch. @error = " & @error & ", @extended = " & @extended)
Else
    _Arraydisplay($aResult)
EndIf
_OL_Close($oOutlook)

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

:)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to post
Share on other sites

I went through the reference page (OutlookEX.htm) available in the zip file and Google, but am not sure what the right way would be to read data out of what I assume is a 2D text array.

Should I loop through the array using _OL_ItemGet() ?

Global $oOutlook = _OL_Open()
$aFolder = _OL_FolderAccess($oOutlook, "", $olFolderToDo)

Global $aResult = _OL_ItemFind($oOutlook, $aFolder[1], $olTask, "", "", "", "EntryID,Subject,LastModificationTime")

;For $i = 1 To UBound($aItems) - 1 Step 1
For $i = 1 To 5 - 1 Step 1
    Local $sItem = _OL_ItemGet($oOutlook, $aResult[$i][2],$olTask,"")
    MsgBox($MB_SYSTEMMODAL, "Item", $sItem)
Next

_OL_Close($oOutlook)

 

Link to post
Share on other sites

What do you try to achieve with this code?
$aResult[$i][2] already holds the last modification date/time. If you need more properties for the task items why not simply add them to the _OL_ItemFind statement and then drop the loop?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.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 (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

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

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Cyborg5000
      Can some one please point me why i keep getting the error while the script is in loop:-
      "C:\Program Files (x86)\AutoIt3\Include\OutlookEX.au3" (2443) : ==> Subscript used on non-accessible variable.:
      If Not (IsNumber($iAttachment)) Or $iAttachment < 1 Or $iAttachment > $aAttachments[0][0] Then Return SetError(8, $aAttachments[0][0], 0)
      If Not (IsNumber($iAttachment)) Or $iAttachment < 1 Or $iAttachment > $aAttachments^ ERROR
      My code as below though copied and modified as per need, to get attachments, and other details.
      #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <File.au3> #include <IE.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <StringConstants.au3> #include <FileConstants.au3> #include <Array.au3> #include <String.au3> #include <UIAWrappers.au3> #include <GuiEdit.au3> #include <Clipboard.au3> #include <WinAPI.au3> #include <ColorConstants.au3> #include <FontConstants.au3> #include <ProgressConstants.au3> #include <Restart.au3> #include <_IEquerySelectorAll.au3> #include <GuiRichEdit.au3> #include <hiddenDesktopInteract.au3> #include <Date.au3> #include <CUIAutomation2.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <OutlookEX.au3> #include <Misc.au3> #include <MsgBoxConstants.au3> ;Global $oErrorHandler = ObjEvent("Autoit.Error", "ComErrorHandler") FileDelete("D:\attachment\*.*") FileDelete("D:\Email-Details\*.*") FileDelete("D:\Script-temp\*.*") FileDelete("D:\Downloaded-Cert\*.*") FileDelete("D:\LOG\*.*") RunWait("taskkill /F /IM iexplore.exe /T", "", @SW_HIDE) ;Global $Errorcomments ;If Not IsDeclared($Errorcomments) Then Global $Errorcomments ; ***************************************************************************** ; Example Script ; Handle Outlook NewmailEX event when a new mail arrives. ; This script loops until Shift-Alt-E is pressed to exit. ; ***************************************************************************** HotKeySet("+!e", "_Exit") ;Shift-Alt-E to Exit the script ;MsgBox(64, "OutlookEX UDF Example Script", "Hotkey to exit the script: 'Shift-Alt-E'!") Global $oOApp = ObjCreate("Outlook.Application") Global $test = ObjEvent($oOApp, "oOApp_") While 1     Sleep(400) WEnd FileDelete("D:\attachment\*.*") FileDelete("D:\Email-Details\*.*") FileDelete("D:\Script-temp\*.*") FileDelete("D:\Downloaded-Cert\*.*") FileDelete("D:\LOG\*.*") RunWait("taskkill /F /IM iexplore.exe /T", "", @SW_HIDE) ; Outlook 2007 - NewMailEx event - http://msdn.microsoft.com/en-us/library/bb147646%28v=office.12%29.aspx Func oOApp_NewMailEx($sOL_EntryId)     FileDelete("D:\attachment\*.*")     FileDelete("D:\Email-Details\*.*")     FileDelete("D:\Script-temp\*.*")     FileDelete("D:\Downloaded-Cert\*.*")     FileDelete("D:\LOG\*.*")     RunWait("taskkill /F /IM iexplore.exe /T", "", @SW_HIDE)     Sleep(1000)     Local $oOL_Item = $oOApp.Session.GetItemFromID($sOL_EntryId, Default)     Sleep(1000)     _OL_ItemAttachmentSave($oOApp, $oOL_Item, Default, 1, "D:\attachment\")     Sleep(1000)     ;MsgBox(64, "OutlookEX UDF Example Script", "New mail has arrived!" & @CRLF & @CRLF & _     ;"From:    " & $oOL_Item.SenderName & @CRLF & _     ;"Subject: " & $oOL_Item.Subject)     Local $oOL_Item1 = $oOApp.Session.GetItemFromID($sOL_EntryId, Default)     Sleep(1000)     Local $oOL_Sender = $oOL_Item1.Sender     If $oOL_Sender.AddressEntryUserType = $olExchangeUserAddressEntry Or $oOL_Sender.AddressEntryUserType = $olExchangeRemoteUserAddressEntry Then         Local $oExchangeUser = $oOL_Sender.GetExchangeUser     Else         Sleep(2000)     EndIf     Sleep(1000)     Local $sendername = ("D:\Email-Details\sendername.txt")     Local $Subject = ("D:\Email-Details\subject.txt")     ;=================================Subjectfile file write ===========================================     Local $Subject1 = FileOpen($Subject, $FO_APPEND)     If $Subject1 = -1 Then         MsgBox($MB_SYSTEMMODAL, "", "An error occurred whilst writing the Subject file.")         Return False     EndIf     ; Write data to the file using the handle returned by FileOpen.     FileWrite($Subject1, $oOL_Item1.Subject)     ; Close the handle returned by FileOpen.     FileClose($Subject1)     Sleep(1000) ;=================================End sendername file write ===========================================     $Filerunpath = ("C:\Users\certauto\Desktop\Test.Exe")     Local $iPID = Run($Filerunpath)     ProcessWaitClose($iPID)     Sleep(1000)     _OL_ItemModify($oOApp, $oOL_Item, Default, "Unread=False")     ;$openemail = WinActivate ( "[CLASS:NetUIHWND; INSTANCE:1]", "" )     ;ControlClick($openemail, "", "NUIDialog")     ;$oOApp.Session.Logoff     Sleep(1000)     ;====================Mark email as read===========================================     ;_OL_ItemModify($oOL_Item,$oOApp.Session.GetItemFromID($sOL_EntryId, Default, "Unread=False")     Sleep(1000) EndFunc   ;==>oOApp_NewMailEx Func _Exit()     Exit EndFunc   ;==>_Exit
    • By Skysnake
      This assumes implementation of the OutlookEX UDF.
      I have PSTs which are becoming unmanageable 
      The idea is to make a simple GUI (Listview) which can combine non-Outlook data and include emails based on criteria.  Manage them in the GUI (delete / reply etc) and update to Outlook.
      So the issue would be to manage the items in the GUI while using the PST as a database.
      Ideas on how to do this? What would the key be?
    • By Reizvoller
      Howdy!
      I've been reading through the OutLookEX documentation and examples for the past two days ( VERY well documented, very clear! ) 
      https://www.autoitscript.com/wiki/OutlookEX_UDF_-_General
       
      But I've had trouble locating information on specifying what user to use. My outlook is linked to two email accounts and I can only manipulate the main account's stuff. A simple script I've been playing with is this 
      ; Include Functions #include <OutlookEX.au3> ; Connect to Outlook Global $oOutlook = _OL_Open() If @error <> 0 Then Exit MsgBox(16, "Connect to Outlook", "Error connecting to Outlook. @error = " & @error & ", @extended = " & @extended) ;List the folders Global $aResult = _OL_FolderTree($oOutlook, "*") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_FolderTree Example Script", "Error accessing root folder. @error = " & @error) _ArrayDisplay($aResult, "OutlookEX UDF: _OL_FolderTree Example Script - All folders") It works like a charm but it only returns my main account's folders. 
      I really hope I didn't overlook a wiki page or help file... 
      Any assistance would be greatly appreciated!
      -Reiz
    • By galan2015
      Is there any solution on receiving e-mails? I would like to create a script so that I will not have to log in through the browser.
×
×
  • Create New...