Jump to content

Search the Community

Showing results for tags 'outlookex'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 22 results

  1. I was in a hurry to convert 200+ address book from Google Contacts (G Suite, contacts exported in .CSV with Google Takeout, but the contact format is the same for every Google Gmail account) to Outlook contacts, so I developed this quick and very dirty script. Starting from a .CSV exported from Google, you can run the script and you have the contacts ported directly (no outlook import) on the Outlook Address book. In my experience, the fields of Google contacts are not fixed in number and maybe also in position, so I made the choice to import only certain fields to Outlook, scanning every line. These fields, exact google names: "Given Name" "Family Name" "E-mail 1 - Value" "E-mail 2 - Value" "Phone 1 - Value" "Phone 2 - Value" "Website 1 - Value" "Notes" "Name" "Address 1 - Formatted" Also the lines of google contacts can be weird as CR and LF are not "regular". I include my code, (worked with no errors on a lot of conversions) and also a very small fake adress book with examples of problems I encountered and resolved. #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=Icone\Win98-ico\script_file_teal.ico #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** ;GOA2OAB ;G.oogle A.ddress B.ook 2 (to) O.utlook A.ddress B.ook ;(C) NSC 2019 ; convert a google (takeout) address book to an Outlook Address Book #include <File.au3> #include <Array.au3> #include <_Gollog.au3> #include <MsgBoxConstants.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #include <String.au3> #include <Math.au3> ; ***************************************************************************** #include <OutlookEX.au3> ; super perla pearl outlook create contacts !!!!! ; ***************************************************************************** Global $oItem Global $oOutlook = _OL_Open() If @error <> 0 Then MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) ; ***************************************************************************** Global $ver = "V.0.8192", $tempdir = "c:\GAB2OAB_temp", $File2convert, $aRetArray, $workfile = $tempdir & "\work-GAB2OAB.csv", $workfile2 = $tempdir & "\WORK2-gab2oab.csv", $FINALab = $tempdir & "\NEW-ab.csv", $A3clean[0], $A4clean[0], $A5clean[0] ; Gollog Autogenerated Gui $mygui = "G.oogle A.ddress B.ook 2 (to) O.utlook A.ddress B.ook " & $ver & " NSC 2019" gollog_ini($mygui, 600, 200, 50, 50, "0x0033cc", "0xA8D9BD", "courier", 8, 600, @ScriptDir & "\GAB2OAB_log.txt") ; initialization with colors and font choice, more options see the UDF Gollog(">>>>>>>> GAB2OAB " & $ver) $File2convert = FileOpenDialog("Select Google Address Book File", @DesktopDir & "\", "CSV (*.csv)", BitOR($FD_FILEMUSTEXIST, $FD_MULTISELECT)) Gollog("selected " & $File2convert) If Not FileExists($tempdir) Then Gollog("creating " & $tempdir) DirCreate($tempdir) EndIf If FileExists($workfile) Then Gollog("deleting " & $workfile) FileDelete($workfile) EndIf If FileExists($workfile2) Then Gollog("deleting " & $workfile2) FileDelete($workfile2) EndIf If FileExists($FINALab) Then Gollog("deleting " & $FINALab) FileDelete($FINALab) EndIf cleanfile() readfile() cleanfile2() readfile2() write2Outlook() Exit Func write2Outlook() Gollog("---> Assigning Fields...") Sleep(300) Local $FirstName = 4 ; initialize with Yomi name - always empty in tested companies, low class workaround Local $LastName = 4 Local $Email1Address = 4 Local $Email2Address = 4 Local $MobileTelephoneNumber = 4 Local $OtherTelephoneNumber = 4 Local $Webpage = 4 Local $Body = 4 Local $Fullname = 4 Local $BusinessAddress = 4 For $z = 0 To UBound($A5clean, 2) - 1 ;If $A5clean[2][$z] = "Additional Name" Then $MiddleName = $z ; limit @ 10 If $A5clean[1][$z] = "Given Name" Then $FirstName = $z If $A5clean[1][$z] = "Family Name" Then $LastName = $z If $A5clean[1][$z] = "E-mail 1 - Value" Then $Email1Address = $z If $A5clean[1][$z] = "E-mail 2 - Value" Then $Email2Address = $z If $A5clean[1][$z] = "Phone 1 - Value" Then $MobileTelephoneNumber = $z If $A5clean[1][$z] = "Phone 2 - Value" Then $OtherTelephoneNumber = $z If $A5clean[1][$z] = "Website 1 - Value" Then $Webpage = $z If $A5clean[1][$z] = "Notes" Then $Body = $z If $A5clean[1][$z] = "Name" Then $Fullname = $z If $A5clean[1][$z] = "Address 1 - Formatted" Then $BusinessAddress = $z Next Gollog("Fields Found !") For $i = 2 To UBound($A5clean, 1) - 1 Gollog("Contact 2 Outlook line " & $i) ;Gollog($A5clean[$i][1]) ; Create a contact with first- and lastname ; ***************************************************************************** $oItem = _OL_ItemCreate($oOutlook, $olContactItem, "", "", "FullName=" & $A5clean[$i][$Fullname], "BusinessAddress=" & $A5clean[$i][$BusinessAddress], "FirstName=" & $A5clean[$i][$FirstName], "LastName=" & $A5clean[$i][$LastName], "Email1Address=" & $A5clean[$i][$Email1Address], "Email2Address=" & $A5clean[$i][$Email2Address], "WebPage=" & $A5clean[$i][$Webpage], "MobileTelephoneNumber=" & $A5clean[$i][$MobileTelephoneNumber], "OtherTelephoneNumber=" & $A5clean[$i][$OtherTelephoneNumber], "Body=" & $A5clean[$i][$Body]) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemCreate ", "Error creating a contact'. @error = " & @error & ", @extended = " & @extended) ; Add a picture to the contact ;$oItem.AddPicture(@ScriptDir & "\The_Outlook.jpg") $oItem.Save() ; ***************************************************************************** Next MsgBox(64, "OutlookEX UDF: the magic was made!", "All contacts successfully created ") _OL_Close($oOutlook) ; close the connection to Outlook EndFunc ;==>write2Outlook Func cleanfile() Gollog('start check for unwanted LF... / final rogue "') Sleep(300) Local $A2Clean = FileReadToArray($File2convert) ;_ArrayDisplay($A2Clean, "original file", Default, 8) Local $dimLIST = UBound($A2Clean) - 1 Local $string2write = "" Local $Astring1 = "" Local $Astring2 = "" Local $salvaAstring1 = "" Local $openLF = 0 ; we are between "LF" across lines For $i = 0 To $dimLIST Gollog('workin on line ' & $i) ;Gollog($A2Clean[$i]) $Astring1 = StringToASCIIArray($A2Clean[$i]) ;_ArrayDisplay($Astring1) Local $DimAstring1 = UBound($Astring1) - 1 If $openLF = 1 Then ;check new line if start with " $Astring2 = StringToASCIIArray($A2Clean[$i]) If $Astring2[0] = "34" Then ; gollog('found initial " ') $openLF = 2 Else Gollog('error new line not starting with "') MsgBox(48, "error", 'error new line not starting with "') EndIf EndIf If $Astring1[$DimAstring1] = "34" Then ; gollog('First line -> Found final "') If $openLF <> 0 Then $salvaAstring1 = $salvaAstring1 & $A2Clean[$i] Else $salvaAstring1 = $A2Clean[$i] EndIf Else _ArrayAdd($A3clean, $salvaAstring1 & $A2Clean[$i]) ;Gollog("adding to cleaned array state:" & $openLF) $openLF = 0 $salvaAstring1 = "" EndIf Next Gollog('end clean from rogue "') ;_ArrayDisplay($A3clean, 'cleaned from rogue "') ;___________________________________P-PP-PP,P------------------------------------------------- Gollog('Start joining lines based on ODD " ') Sleep(300) ;_MathCheckDiv ( $iNum1 [, $iNum2 = 2] ) pari e dispari perla pearl Local $hFileOpen = FileOpen($workfile2, $FO_APPEND) If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred whilst writing the file.") Return False EndIf Local $dimLIST = UBound($A3clean) - 1 Local $Astring1 = "" Local $Astring2 = "" Local $dimSTRING = "" Local $AapiciINriga Local $numeroapiciINriga = 0 Local $sommaNumeroapiciINrighe = 0 Local $salvaAstring1 = "" Local $dispari = 0 For $i = 0 To $dimLIST Gollog("workin' on line " & $i) $Astring1 = StringToASCIIArray($A3clean[$i]) ;_ArrayDisplay($Astring1) ;Gollog($A3clean[$i]) $AapiciINriga = _ArrayFindAll($Astring1, '34') If $AapiciINriga <> -1 Then $numeroapiciINriga = UBound($AapiciINriga) ; Gollog("N° " & $numeroapiciINriga & " apici in riga " & $i) $sommaNumeroapiciINrighe += $numeroapiciINriga If _MathCheckDiv($sommaNumeroapiciINrighe) = 1 Then $salvaAstring1 = $salvaAstring1 & $A3clean[$i] $dispari = 1 Else Local $towrite = $salvaAstring1 & $A3clean[$i] ; gollog("scrivo " & $towrite) FileWriteLine($hFileOpen, $towrite) $salvaAstring1 = "" $sommaNumeroapiciINrighe = 0 $dispari = 0 EndIf Else ; Gollog("zero apici in riga " & $i) If $dispari = 1 Then ;linea vuota o senza apici ma " aperte dispari $salvaAstring1 = $salvaAstring1 & $A3clean[$i] Else Local $towrite = $salvaAstring1 & $A3clean[$i] ; gollog("scrivo " & $towrite) FileWriteLine($hFileOpen, $towrite) $salvaAstring1 = "" $sommaNumeroapiciINrighe = 0 $dispari = 0 EndIf EndIf Next Gollog('END joined lines based on ODD "') ;_ArrayDisplay($A4clean, 'joined lines based on ODD "') FileClose($hFileOpen) EndFunc ;==>cleanfile Func readfile() gollog("reading work file and creating multiD array") Sleep(300) $A4clean = FileReadToArray($workfile2) If @error = 1 Or @error = 2 Then gollog("error reading work2 file " & @error) Else ; _ArrayDisplay($A4clean, "cleaned 1", Default, 8) EndIf EndFunc ;==>readfile Func cleanfile2() Local $dimLIST = UBound($A4clean) - 1 Local $Astring1 = "" Local $conta = 0 Local $salvaconta = 0 Local $dimSTRING = "" $salvalinea = "" Local $standardNumeroVirgole = 0 Local $hFileOpen = FileOpen($FINALab, $FO_APPEND) If $hFileOpen = -1 Then MsgBox($MB_SYSTEMMODAL, "", "An error occurred whilst writing the file.") Return False EndIf Gollog('Checkin , number') For $i = 0 To $dimLIST ;Gollog('workin on line ' & $i) $Astring1 = StringToASCIIArray($A4clean[$i]) ;_ArrayDisplay($Astring1) $dimSTRING = UBound($Astring1) - 1 For $y = 0 To $dimSTRING If $Astring1[$y] = "44" Then ; secondo step , $conta += 1 EndIf Next If $i = 0 Then $standardNumeroVirgole = $conta gollog("----------numero virgole -> " & $standardNumeroVirgole) EndIf If $conta = $standardNumeroVirgole Then FileWriteLine($hFileOpen, $A4clean[$i]) EndIf If $conta > $standardNumeroVirgole Then Gollog('>>> Line ' & $i & ' Virgole' & $conta) $toprecise = $A4clean[$i] $tofinal = '' While StringInStr($toprecise, '"') <> 0 $tofinal = preciseremoval($toprecise) ;super smart $toprecise = $tofinal WEnd FileWriteLine($hFileOpen, $toprecise) EndIf If $conta < $standardNumeroVirgole Then Gollog('<<< Line ' & $i & ' Virgole' & $conta) $salvalinea = $salvalinea & $A4clean[$i] $salvaconta += $conta If $salvaconta = $standardNumeroVirgole Then $salvaconta = 0 FileWriteLine($hFileOpen, $salvalinea) $salvalinea = 0 EndIf EndIf $conta = 0 Next FileClose($hFileOpen) EndFunc ;==>cleanfile2 Func writeWORKfile2() Gollog("writing work file") If _FileWriteFromArray($workfile, $A4clean) <> 1 Then gollog("error writing work file " & @error) EndIf EndFunc ;==>writeWORKfile2 Func readfile2() gollog("reading work file and creating multiD array") If _FileReadToArray($FINALab, $A5clean, Default, ",") = 0 Then MsgBox(48, "errore", @error) EndIf ;_ArrayDisplay($A5clean, "cleaned 2", Default, 8) EndFunc ;==>readfile2 Func preciseremoval($Pclean) ; llllllllllllllllllllllllll ---- pass 1 for ",," $Astring1 = StringToASCIIArray($Pclean) ;_ArrayDisplay($Astring1) $dimSTRING = UBound($Astring1) - 1 Local $salvadelete = "" Local $cond1 = 0 For $y = 0 To $dimSTRING If $cond1 = 1 Then ; , removed so exit from loop If $Astring1[$y] = "34" Then ; terzo step " in chiusura ; gollog('Found right "') If $salvadelete = "" Then $salvadelete = String($y) Else $salvadelete = $salvadelete & ";" & $y EndIf $cond1 = 0 ExitLoop EndIf EndIf If $cond1 = 1 Then If $Astring1[$y] = "44" Then ; secondo step , If $salvadelete = "" Then $salvadelete = String($y) Else $salvadelete = $salvadelete & ";" & $y EndIf EndIf EndIf If $Astring1[$y] = "34" And $cond1 = 0 Then ;PRimo step per primo ->" $cond1 = 1 ;gollog('Found left "') If $salvadelete = "" Then $salvadelete = String($y) Else $salvadelete = $salvadelete & ";" & $y EndIf ;Gollog("debug" & $salvaApici) EndIf Next ; Gollog("apici e virgole da togliere: " & $salvadelete) ;gollog("virgole togliere: " & $salvaVirgole) If _ArrayDelete($Astring1, $salvadelete) = -1 Then Gollog("error in arraydelete apici " & @error) gollog(StringFromASCIIArray($Astring1)) Else gollog(' PASS 1 removed unwanted ",," from line ') EndIf $Astring2 = StringFromASCIIArray($Astring1) $Pclean = $Astring2 Return $Pclean EndFunc ;==>preciseremoval You will need the OutlookEX.au3 , look at this link and also my logging UDF _Gollog.au3, attached. Used on Outlook from 2010 to 2016/365 with no problems. Hope this script can help someone. TEST1.csv _GOLLOG.au3
  2. Hi guys, i would like to write a codding to send email with Bold/Italic text and new paragraph line. Example like below: Each line have 1 gab line. $oOApp = ObjCreate("Outlook.Application") $oOMail = $oOApp.CreateItem ($olMailItem) $oOMail.Save With $oOMail .To = ($to) .Subject = $subj .HTMLBody = "HEADLINE" & "Body Text" & "this is for testing purpose" .attachments.add ($attachment) .Send EndWith
  3. Here is my code: Currently it finds all the unread, subject restricted emails in the inbox and its subfolders. (finds 15 when it should only find 4) $aItems = _OL_ItemFind($oOutlook, $mFolder[1], $olMail, "[UnRead]=True", "Subject", "Maintenance Request", "EntryID,Subject", "", 1) I want to find the emails in the inbox but I don't want to include the emails from the inbox's sub-folders.
  4. Morning, I am having trouble moving emails to a folder under another account's inbox. Here is the code I have tried so far. ; Access the Need Human folder under HELPDESK email account Local $nhFolder = _OL_FolderAccess($oOutlook, "helpdesk@hotmail.com\Inbox\Need Human") If @error <> 0 Then Exit MsgBox(16, "GC_WO_BOT:", "Error accessing folder 'helpdesk@hotmail.com\Inbox\Need Human'. @error = " & @error & " at line: " & @ScriptLineNumber) ;_ArrayDisplay($nhFolder, "Folder Access") ;MsgBox("", "email", $aItems[1][0]) ; Move the E-mails _OL_ItemMove($oOutlook, $aItems[1][0], Default, $nhFolder[5], "Need Human") If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OL_ItemMove", "Error moving specified Email. @error = " & @error & ", @extended = " & @extended & " at line: " & @ScriptLineNumber) ConsoleWrite("The current email " & $aItems[1][0] & "was just moved to: " & $nhFolder[1] & @CRLF) I get error moving specified email @error = 1, @extended = 1
  5. @water I am getting this error for the first time ever. I have run my code well over 60 times and I'm a bit confused as to why I am sometimes getting this error now. Here is the code and the error message that popped up: $aItems = _OL_ItemFind($oOutlook, "*\Outlook-UDF-Test", $olMail, "[UnRead]=True", "", "", "EntryID,Subject", "", 1) If Not IsArray($aItems) Then Exit MsgBox(48, "", "@error = " & @error & ", @extended: " & @extended & " at line: " & @ScriptLineNumber) @error = 0, @extended: 0 at line 317 I tried looking in the OutLookEX UDF and there is no explanation of error 0 This is what the UDF says about "_OL_ItemFind" Success: One based two-dimensional array with the properties specified by $sReturnProperties Failure: Returns "" and sets @error: 1 - You have to specifiy $sSearchName AND $sSearchValue or none of them 2 - $sWarningClick not found 3 - Error accessing the specified folder. See @extended for errorcode returned by _OL_FolderAccess 4 - Error accessing specified property. @extended is set to the COM error 5 - Error filtering items. @extended is set to the COM error 1nmm - Error checking the $sReturnProperties as returned by __OL_CheckProperties. n is either 0 (property does not exist) or 1 (Property has invalid case) mm is the index of the property in error (one based) As always any help or suggestions will be greatly appreciated.
  6. I was running my script and everything was working fine and then it just stopped working. I got this error message: !>12:51:55 AutoIt3.exe ended.rc:-1073741819 +>12:51:55 AutoIt3Wrapper Finished. >Exit code: 3221225477 Time: 354.6 I looked that error up and this article (https://www.autoitscript.com/trac/autoit/ticket/2541) said it was fixed a long time ago. I am using version: SciTE Version 4.1.0, how am I getting this error? (first time I got it after running my code 50+ times) it crashed while trying to loop through emails. Full output log: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" /run /prod /ErrorStdOut /in "C:\" /UserParams +>12:46:01 Starting AutoIt3Wrapper v.18.708.1148.0 SciTE v.4.1.0.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE >Running AU3Check (3.3.14.5) from:C:\Program Files (x86)\AutoIt3 +>12:46:01 AU3Check ended.rc:0 >Running:(3.3.14.5): --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop Action 1: Create a connection to the outlook account at line: 192 Action 1: Finished at line: 205 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Current email has been changed from Unread to Read. at line: 238 Current email has been changed from Unread to Read. at line: 238 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 3: Store vaild E-mails at line: 258 Number of unread E-mails: 17 at line: 290 Action 3: Finished at line: 292 Current number of processed Emails is: 0 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180 Action 7: Finished at line: 2186 Opening a new Chrome window. at line: 2747 Action 8: Open Web Browser at line: 2240 _WDStartup: "MicrosoftWebDriver.exe" --verbose Action 8: Finished at line: 2270 Action 9: Navigate to Work Order Tracking at line: 2281 Action 9: Finished at line: 2295 Action 10: Click on Create New Work Order at line: 2306 Action 10: Finished Action 11: Send E-mail Data to it's proper field at line: 2324 Sub-Action 3: Split Long Description at line: 2522 Sub-Action 3: Finished at line: 2576 Work Order Number: 660308 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 1 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Work Order Number: 660309 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 2 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Sub-Action 3: Split Long Description at line: 2522 Sub-Action 3: Finished at line: 2576 Work Order Number: 660310 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 3 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Work Order Number: 660311 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 4 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Work Order Number: 660312 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 5 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Work Order Number: 660313 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 6 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Proper Building format used. Send Location: YT6508 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Long Description. Suite not needed. at line: 1475 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Work Order Number: 660314 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 7 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Proper Building format used. Send Location: CN2116 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Long Description. Suite not needed. at line: 1475 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Sub-Action 3: Split Long Description at line: 2522 Sub-Action 3: Finished at line: 2576 Work Order Number: 660315 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 8 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Proper Building format used. Send Location: DT4905 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Work Order Number: 660316 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 9 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Proper Building format used. Send Location: YT6513 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 Young Tower has no suites! Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Sub-Action 3: Split Long Description at line: 2522 Sub-Action 3: Finished at line: 2576 Work Order Number: 660317 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 10 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Proper Building format used. Send Location: BT3310 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Long Description. Suite not needed. at line: 1475 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Sub-Action 3: Split Long Description at line: 2522 Sub-Action 3: Finished at line: 2576 Work Order Number: 660318 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 11 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Proper Building format used. Send Location: BT3411 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Sub-Action 3: Split Long Description at line: 2522 Sub-Action 3: Finished at line: 2576 Work Order Number: 660319 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 12 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 Action 4: Finished at line: 361 Action 5: Store E-mail's contents at line: 371 Action 5: Finished at line: 495 Action 6: Test to Skip based on location at line: 508 Proper Building format used. Send Location: DT4519 Action 6: Finished at line: 710 Action 7: Check if location needs to be a suite at line: 720 The 'Bathroom' is not mentioned in the Description. Suite not needed. at line: 2180 Action 7: Finished at line: 2186 Action 11: Send E-mail Data to it's proper field at line: 2324 Sub-Action 3: Split Long Description at line: 2522 Sub-Action 3: Finished at line: 2576 Work Order Number: 660320 Action 11: Finished at line: 2511 Change status was called at line: 2758 Sub-Action 2: Change E-mail to Read at line: 2223 Current email has been changed from Unread to Read. at line: 2226 Sub-Action 2: Finished at line: 2230 Action 16: Create New Work Order at line: 2705 Action 16: Finished at line: 2719 Current number of processed Emails is: 13 at line: 2735 Action 2: Scan for invaild E-mails at line: 215 Number of SKIPPED unread E-mails: at line: 226 Number of SKIPPED E-mails: 0 at line: 246 Action 2: Finished at line: 248 Action 4: Loop through E-mails at line: 302 !>12:51:55 AutoIt3.exe ended.rc:-1073741819 +>12:51:55 AutoIt3Wrapper Finished. >Exit code: 3221225477 Time: 354.6
  7. I had a problem using OutlookEX when automating Outlook v14 (2010) when it was already running; the object returned from _OL_Open wasn't usable . As a test, this example would fail to create an object for $objMail but there was no error from _OL_Open() $outlook = _OL_Open() $objMail = $outlook.Application.CreateItem(0) but this replacement would work: $outlook = ObjCreate("Outlook.Application") $objMail = $outlook.Application.CreateItem(0) and this would fail: $outlook = ObjGet("", "Outlook.Application") $objMail = $outlook.Application.CreateItem(0) So for my own purposes, the "fix" was to just to add a flag for _OL_Open() to ObjCreate() instead of ObjGet() when needed, setting it to True when there's a problem Func _OL_Open($bCreateNew = False, $bWarningClick = False, $sWarningProgram = "", $iWinCheckTime = 1000, $iCtrlCheckTime = 1000, $sProfileName = "", $sPassword = "") If $bCreateNew = Default Then $bCreateNew = False If $bWarningClick = Default Then $bWarningClick = False If $sWarningProgram = Default Then $sWarningProgram = "" If $iWinCheckTime = Default Then $iWinCheckTime = 1000 If $iCtrlCheckTime = Default Then $iCtrlCheckTime = 1000 If $sProfileName = Default Then $sProfileName = "" If $sPassword = Default Then $sPassword = "" Local $oOL = ObjGet("", "Outlook.Application") If IsObj($oOL) Then $__bOL_AlreadyRunning = True If Not IsBool($bWarningClick) Then Return SetError(3, 0, 0) If Not IsInt($iWinCheckTime) Then Return SetError(4, 0, 0) If Not IsInt($iCtrlCheckTime) Then Return SetError(7, 0, 0) If $__bOL_AlreadyRunning And $sProfileName <> "" Then Return SetError(10, 0, 0) ;Specified a profile name to logon to but Outlook is already running. ; Activate the COM error handler for older AutoIt versions If $__iOL_Debug = 0 And (Number(StringReplace(@AutoItVersion, ".", "")) < 3392 Or Number(StringReplace(@AutoItVersion, ".", "")) > 33120) Then _OL_ErrorNotify(4) SetError(0) ; Reset @error which is returned by _OL_ErrorNotify if a COM error handler has already been set up by the user EndIf If Not $__bOL_AlreadyRunning Or $bCreateNew Then $oOL = ObjCreate("Outlook.Application") If @error Or Not IsObj($oOL) Then Return SetError(1, @error, 0) EndIf However, the problem with modifying a UDF is in remembering to apply the same fix for to any update Was there any other "fix" I should have tried before tampering with the UDF? Thanks.
  8. I watched _OL_ItemSend&_OL_ItemFind&_OL_ItemCreate in OutlookEx UDF but hmmm Since it use the test environnement i cant get the orders of the mail creation Can someone make me win some time of reading all exemples script and lead me how to do one ? That whould be lovely. Gnight
  9. Dear members, I am working on a project where, emails from outlook are to be read and moved to various folders within the mailbox, based on the content of the emails. I used the below code for moving mails. It works fine when I run it against individual mail ids. But when I run it on Shared mailbox, the mails are not moved to respective folders. _OL_ItemMove($oOutlook, $sEntryId, Default, $sDestinationFolder) The value of $sEntryId is saved in an excel report initially. The current process reads the $sEntryId from the excel and passes it to "_OL_ItemMove" statement. Requesting the guidance of the forum members in this issue.
  10. 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.
  11. 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.
  12. @water Wondering if you know if the OutlookEx.udf will allow someone to "paste'/"create" a table in an appointment? I can add text to the body, but I'd like to all be formatted to look nice for the user.
  13. I'm writing Outlook pst cleaner and now I'm stuck. Compiled script is crashing with OS crash message. When I tryied to run script from editor it's exiting itself (mabye it's some type of crash?) always when it's processing on 4-rd pst file. Here is my code: #include <OutlookEX.au3> #include <Date.au3> #include <File.au3> #include <Array.au3> _cleanOutlook("Administrator") _cleanOutlook("Admin") Exit Func _cleanOutlook($user) $foldery = "Wiadomości-śmieci#?SPAM#?Junk E-mail#?Elementy usunięte#?Deleted Items" $tab_folderow = StringSplit($foldery, "#?", 1) $tab_pst = _FileListToArrayRec("c:\users\" & $user, "*.pst", 1+4+8, 1, 0, 2) ;~ _ArrayDisplay($tab_pst) For $d = 1 To UBound($tab_pst) -1 Step +1 $outlook = _OL_Open(True) _OL_Close($outlook, True) $outlook = _OL_Open() Local $aStores = _OL_StoreGet($outlook) ;~ _ArrayDisplay($aStores) For $i = 1 to $aStores[0][0] If $aStores[$i][4] = True Then ;~ ConsoleWrite(@CRLF & "zamykam pst 2") _OL_PSTClose($outlook,$aStores[$i][0]) EndIf Next ;~ _OL_PSTAccess($outlook, "C:\Users\Administrator\Desktop\cos.pst") _OL_PSTAccess($outlook, $tab_pst[$d]) ConsoleWrite(@CRLF & $tab_pst[$d]) ;~ $tab_struktury = _OL_FolderTree($outlook, "*", 10) ;~ If @error Then ;~ ContinueLoop ;~ EndIf ;~ _ArrayDisplay($tab_struktury) $tab_ktory_pst = _OL_PSTGet($outlook) ;~ _ArrayDisplay($tab_ktory_pst) For $a = 0 To UBound($tab_ktory_pst) -1 Step +1 If $tab_ktory_pst[$a][2] = $tab_pst[$d] Then ;~ MsgBox(0, "", $tab_ktory_pst[$a][0]) $nazwa_bazy_pst = $tab_ktory_pst[$a][0] EndIf Next ;~ MsgBox(0, "", UBound($tab_folderow)) ;~ _ArrayDisplay($tab_folderow, $tab_pst[$d]) ConsoleWrite(@CRLF & "przed while") $a = 0 While $a < 2 ConsoleWrite(@CRLF & "while 1") For $b = 1 To UBound($tab_folderow) -1 Step +1 ConsoleWrite(@CRLF & "for 1") $tab_struktury = _OL_FolderTree($outlook, $nazwa_bazy_pst) ;~ _ArrayDisplay($tab_struktury, $nazwa_bazy_pst) ;~ $folder = _OL_FolderAccess($outlook, StringTrimLeft($tab_struktury[0], 2) & "\" & $tab_folderow[$b]) $folder = _OL_FolderAccess($outlook, $nazwa_bazy_pst & "\" & $tab_folderow[$b]) ;~ ConsoleWrite(@CRLF & "eeee") If @error Then ;~ MsgBox(0, "", "\\" & $nazwa_bazy_pst & "\" & $tab_folderow[$b] & @CRLF & @error) ConsoleWrite(@CRLF & "przechodze do kolejnego " & $b+1) ContinueLoop EndIf ;~ _ArrayDisplay($folder, $nazwa_bazy_pst) ConsoleWrite(@CRLF & $tab_folderow[$b]) If $tab_folderow[$b] = "Deleted Items" Or $tab_folderow[$b] = "Elementy usunięte" Then ConsoleWrite(@CRLF & "usuwam kosze") _OL_FolderDelete($outlook, $folder[1], 1) _OL_FolderDelete($outlook, $folder[1], 2) _OL_FolderDelete($outlook, $folder[1], 3) _OL_FolderDelete($outlook, $folder[1], 4) ;~ _OL_FolderDelete($outlook, $folder[1], 5) EndIf If $a = 0 Then $tab_maile = "" $data_dzis = @YEAR & "/" & @MON & "/" & @MDAY & " 00:00" ;~ $data_dzis = "2017/01/31 00:00" $data_szukana = _DateAdd("D", "-3", $data_dzis) $tab_maile = _OL_ItemFind($outlook, $folder[1], $olMail, "[Received]<'" & StringReplace($data_szukana, "/", "-") & "'", "", "", "EntryID", "", 1) If @error Then ContinueLoop EndIf ;~ If UBound($tab_maile) > 1 Then ;~ _ArrayDisplay($tab_maile) ;~ EndIf If UBound($tab_maile) > 1 Then For $c = 1 To UBound($tab_maile) -1 Step +1 ;~ ConsoleWrite(@CRLF & "usuwam stare maile") _OL_ItemDelete($outlook, $tab_maile[$c][0], "", False) Next EndIf EndIf Next $a = $a + 1 WEnd ;~ ConsoleWrite(@CRLF & "pokazuje") ;~ $folder[1].Display $olFolderInbox.Display ;~ _OL_PSTClose($outlook, $olFolderInbox) ;~ If @error Then ;~ MsgBox(0, "", @error) ;~ EndIf Local $aStores = _OL_StoreGet($outlook) ;~ _ArrayDisplay($aStores) For $i = 1 to $aStores[0][0] If $aStores[$i][4] = True Then ;~ ConsoleWrite(@CRLF & "zamykam pst 1") _OL_PSTClose($outlook,$aStores[$i][0]) EndIf Next ;_OL_PSTClose($outlook, $folder[1]) _OL_Close($outlook, True) If @error Then MsgBox(0, "", @error) EndIf ConsoleWrite(@CRLF & "zamykam") ProcessWaitClose("outlook.exe", 30) ProcessClose("outlook.exe") Next EndFunc Outlook and OS is updated. I'm usinn OutlooEX in ver. 1.3.1.0 Any ideas?
  14. Hey guys, I wanted to write this in the outlookEX thread but it was locked. I'm currently trying to get a script to write to a public calandar and I can't figure out how to tell autoit to write to the public calandar on the network, I currently have this witch works like I need it to but it writes in my personal calandar, can I make this write in the public one? I didn't find anything in the outlookEX help files #Include <OutlookEX.au3> Global $sStart = StringLeft(_Nowcalc(),16) Global $sEnd = StringLeft(_DateAdd("h", 3, _NowCalc()), 16) Global $oOutlook = _OL_Open() _OL_Wrapper_CreateAppointment($oOutlook, "TestMeeting", $sStart, $sEnd, "My office", False, "Testbody", 15, $olBusy, $olImportanceHigh, $olPrivate, $olRecursWeekly, $sStart, _DateAdd("w", 3, $sEnd), 1) Thanks guys!
  15. Hello. I'm trying to write a script to send multiple files using the local outlook installation (2007/2010/2013), to attach one or multiple files as attachment. As with the URL functionality the attachments never arrive in Outlook ("mailto:someone@company.com?subject=read-this&body=see-attachment&attachment=C:\temp\some-file.txt") I found the nice OutlookEx.UDF, but get lost. Here the readme https://www.autoitscript.com/wiki/OutlookEX_UDF_-_Mail_Item in the wiki describes, that it *IS* possible to send attachments, but I can't see an example howto handle single or multiple attachments. Where do I miss it? REgards ,Rudi.
  16. Hello everyone. Could you, please, help me with following problem? I need to send an email as different sender. The way "on behalf" does not fit me well enough. Much better for me would be something like declaring account credentials of the email i want to use and then use something like SendUsingAccount, but I am not able to figure out, how to get it from current OutlookEx.au3. Do you have any idea? Thanks a lot. Best Regards, Ligy
  17. Hello, I am trying to use the latest version of OutlookEx.au3 and my script is able to send the email to the user first time but second time I am getting this error (see attached) I am trying to check a file every min and verify if the file has been modified, if the file was not modified then an email is sent. It works for the first time but fails in the second iteration. Also, attaching my code, I am very new to AutoIT, any help would be much appreciated! Thanks! #AutoIt3Wrapper_AU3Check_Parameters= -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 #AutoIt3Wrapper_AU3Check_Stop_OnWarning=Y #include <MsgBoxConstants.au3> #include <Debug.au3> #include <File.au3> #include <WinAPI.au3> #include <GuiComboBox.au3> #include <Date.au3> #include <AutoItConstants.au3> #include <Array.au3> #include <Process.au3> #include <StringConstants.au3> #include <FileConstants.au3> ; include for file functions #include <WinAPIFiles.au3> #include <_SingleScript.au3> #include <WinNet.au3> #include <Timers.au3> #include <INet.au3> #include <OutlookEX.au3> #include <DateCalc.au3> #Region AutoIT_Options Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=No case Opt("WinSearchChildren", 1) ;0=no, 1=search children also Opt("TrayIconDebug", 1) ;0=no info, 1=debug line info Opt("TrayAutoPause", 0) ; 0 = no pause , 1 = pause when tray icon is clicked #EndRegion AutoIT_Options Global $logFileName = "Test" & "-" & @YEAR &"_"&@MON& "." & "log" Global $logfile = @ScriptDir &"\"& $logFileName Global $LastModTime Global $LastModTime Global $LastModTimeStamp Global $FiletoCheck_1 Global $FiletoCheck_2 Global $oOutlook = _OL_Open() Func _SendAlert() If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF", "Error creating a connection to Outlook. @error = " & @error & ", @extended = " & @extended) ;Global $sCurrentUser = $oOutlook.GetNameSpace("MAPI").CurrentUser.Name ;_OL_Wrapper_SendMail($oOutlook, $sCurrentUser, "", "", "Travel Time Calc Engine ALERT! ", "An error has occurred, the log file has not changed since: " & $LastModTimeStamp, "", $olFormatHTML, $olImportanceHigh _OL_Wrapper_SendMail($oOutlook, "testemail@gmail.com", "", "", "ALERT! ", "An error has occurred, the log file has not changed since: " & $LastModTimeStamp, "", $olFormatHTML, $olImportanceHigh) If @error <> 0 Then Exit MsgBox(16, "OutlookEX UDF: _OutlookSendMail Wrapper Script", "Error sending mail. @error = " & @error & ", @extended: " & @extended) ;MsgBox(64, "OutlookEX UDF: _OutlookSendMail Wrapper Script", "Mail successfully sent to user '" & $sCurrentUser & "'!") _OL_Close($oOutlook) EndFunc Func _ChecklogFile() $FiletoCheck_2 = FileGetTime($logfile, 0, 1) ; Timestamp If $FiletoCheck_1 == $FiletoCheck_2 Then ; if the time stamp has not changed Msgbox("","","File has not changed") _SendAlert() Else Msgbox("","","File has changed") EndIf EndFunc ; Initial Launch, grab current GetTime $FiletoCheck_1 = FileGetTime($logfile,0,1) Local $YYYY = StringLeft ( $FiletoCheck_1, 4 ) Local $MM = StringMid ( $FiletoCheck_1,5,2) Local $DD = StringMid ( $FiletoCheck_1,7,2 ) Local $HH = StringMid ( $FiletoCheck_1,9,2 ) Local $Min = StringMid ( $FiletoCheck_1,11,2 ) Local $SS = StringMid ( $FiletoCheck_1,13,2 ) $LastModTimeStamp = $YYYY&"-"&$MM&"-"&$DD&" "&$HH&":"&$Min&":"&$SS While 1 Sleep(60000) ; check every 10 mins _ChecklogFile() WEnd
  18. Is anyone interested in functions to work with Outlook "conversations"? You should be able to gather and manipulate items (mails, appointments etc.) which belong to the same conversation.
  19. upgrading a older script that worked on outlook 2010 that is causing me issues on 2013 I have a shared mailbox called "NED-ASSET MANAGEMENT" and I want to access the "INBOX of it" $oOutlook = _OL_Open(True) $mailbox = "NED-ASSET MANAGEMENT" $aFolder = _OL_FolderAccess($oOutlook, StringStripWS($mailbox, 3) & "\INBOX") the error I get is "C:\Program Files (x86)\AutoIt3\Include\OutlookEX.au3" (1269) : ==> The requested action with this object has failed.: $oFolder = $oNamespace.Folders($aFolders[1]) $oFolder = $oNamespace^ ERROR I am stubbed at what the issue is.
  20. 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
  21. 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.
  22. Hello, I am trying to open an Outlook template, edit the contents depending on user input, and then generate a message with the updated information. So far, I have been able to take care of everything except editing the html in the body (Thanks to Waters and the useful UDF). Basically, the body is html (edited and formatted) and I cannot find a way to edit it properly. So if the body in the template says "Hello, John" and the user chooses the name to be "George", I would like to replace it accordingly. What would be the best approach to doing so? Any help is greatly appreciated.
×
×
  • Create New...