Jump to content

OutlookEX.au3 find and delete contacts with special selection


Go to solution Solved by water,

Recommended Posts

Posted

*\Gelöschte Elemente --> result with Filter = 0; without Filter = currently 4 --> thats right. I can reproduce it. Iam not sure - but no field can be selected / founded

Posted

What is the value of @error and @extended after _OL_ItemFind?

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

in both cases no error:

If I use it with filter:

$aResultOutlookBestand = _OL_ItemFind($oOL, "*\Gelöschte Elemente", $olContact, "[nickname]='RecuraAutoImport'", "", "", "EntryID,FirstName,Lastname,BusinessTelephoneNumber,Email1Address,CompanyName,MobileTelephoneNumber,JobTitle,nickname,Title", "")
$iRowsOutlookBestand = UBound($aResultOutlookBestand, $UBOUND_ROWS) 
$iRowsOutlookBestand = ($iRowsOutlookBestand - "1")
;MsgBox($MB_SYSTEMMODAL, "Title", "INITIAL: "&$iRowsOutlookBestand, 10)

_ArrayDisplay($aResultOutlookBestand)

No item gets found. And interresting: The array will not show up.

 

If I use no filter:

$aResultOutlookBestand = _OL_ItemFind($oOL, "*\Gelöschte Elemente", $olContact, "", "", "", "EntryID,FirstName,Lastname,BusinessTelephoneNumber,Email1Address,CompanyName,MobileTelephoneNumber,JobTitle,nickname,Title", "")
$iRowsOutlookBestand = UBound($aResultOutlookBestand, $UBOUND_ROWS)
$iRowsOutlookBestand = ($iRowsOutlookBestand - "1")
;MsgBox($MB_SYSTEMMODAL, "Title", "INITIAL: "&$iRowsOutlookBestand, 10)

_ArrayDisplay($aResultOutlookBestand)

The Items gets found and the array shows up.

 

in both cases autoit ends correct:
 

+>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop.
+>10:10:48 AutoIt3.exe ended.rc:0
+>10:10:48 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 40.35

 

 

 

 

 

 

Posted

Add a

ConsoleWrite("@error: " & @error & " - @extended: " & @extended)

after the find command.

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

 

@error: 5 - @extended: -2147352567

regarding OutlookEX.au3:

;                  |5 - Error filtering items. @extended is set to the COM error

 

Posted

The value of @extended is 0x8002000a which means: DISP_E_OVERFLOW - Out of present range.

Could you please try:

$aResultOutlookBestand = _OL_ItemFind($oOL, "*\Gelöschte Elemente", $olContact, '[NickName]="RecuraAutoImport"', "", "", "EntryID,FirstName,Lastname,BusinessTelephoneNumber,Email1Address,CompanyName,MobileTelephoneNumber,JobTitle,NickName,Title", "")

 

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

same errror. But: if I try the field subject - I get an result. I try other fields. Maybe some fields not searchable from deleted items or not accessable. I will try...

Posted

Wow great: Some fields are translated and some not.

So I have so "try" if the field is nativ EN or if there is an translation. For example subject in germen "betreff" - translated full.

Nickname is not translatet....
Now I get results like expected. I try now to delete the contacts "directly"

Posted

Please have a look at the MS docu , scroll down to the end of the page and make sure that "Deutsch" is selected. Click on "Eigenschaften" and you will see that a few properties get translated and the rest remains in English. I'm not sure this is done by the help page only or in Outlook as well. Never heard about it.

In addition you will see that Outlook doesn't support every property with the Restrict method used in _OL_ItemFind.

Outlook is picky about the property names. "Nickname" is wrong "NickName" is correct.

You will find more details about searching on this page. The Restrict method you use is described as Jet Query.

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

 

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

    • No registered users viewing this page.
×
×
  • Create New...