Jump to content

OutlookEX UDF - Help & Support (II)


water
 Share

Recommended Posts

Use _OL_PSTGet to get a list of PST files. Pass the object of each PST file to _OL_FolderFind.

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

 

Link to comment
Share on other sites

:)

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

 

Link to comment
Share on other sites

I was wondering if there are methods to send a message that can be signed and / or encrypted.

Basically I just want to mimic the settings (this is on Outlook 2013):
Options->Encrypt Mail
Options->Sign Mail
when sending a new memo.

I saw this article: http://support.microsoft.com/kb/2636465 but was hoping for a more straigtforward approach.

Is there a way to check if these properties are set as well?

Thanks.

Link to comment
Share on other sites

The article describes pretty well what is possible. The event approach schould be possible.

I can provide a test script if you need something to play with :)

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

 

Link to comment
Share on other sites

Which AutoIt version do you run?

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

 

Link to comment
Share on other sites

If necessary would you mind to upgrade to 3.3.10?

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

 

Link to comment
Share on other sites

_OL_ItemRecipientCheck fails if i have outlook open.  if i close outlook it works.

error - $oOL is not an object

i have tried passing these:

FirstName LastName

SMTP address

wasn't sure what to use for "Alias"

still not working while outlook is open but working in both cases when outlook is closed

SMTP is spelled wrong by the way in the udf ;)

thanks in advance!

Link to comment
Share on other sites

My apologies, the Options->Encrypt Mail and Options->Sign Mail are contributed by an add-in.  We're not currently using the built in X.509 certificates.  That said I had some luck following the method in the KB article to at least read and attempt to set the regular security settings under Options->More Options->Security Settings...

Link to comment
Share on other sites

Gcue,

can you please post your script and the version of the OutlooKEX UDF you run?

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

 

Link to comment
Share on other sites

SMTP is spelled wrong by the way in the udf ;)

Fixed ;)

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

 

Link to comment
Share on other sites

Gcue,

can you please post your script and the version of the OutlooKEX UDF you run?

i am using 10.0 and here is the script.  thanks for your help - greatly appreciated!

#include <OutlookEX.au3>
#include <AD.au3>
#include <array.au3>
$msg_normal = 0
 
$account = "DACS5730"
 
_AD_Open()
 
If @error Then
_AD_Close()
MsgBox(0, "", "Cannot query domain.")
Exit
EndIf
 
$oExchangeUser = Resolve($account)
 
If @error Then
MsgBox(0, "", "Initials not found.")
Exit
EndIf
 
$oOutlook = _OL_Open()
 
Debug($oExchangeUser)
$aRecipient = _OL_ItemRecipientCheck($oOutlook, $oExchangeUser)
If @error Then
Debug("itemrecipeintcheck", @error)
Else
Debug($aRecipient)
EndIf
 
$dist_lists = _OL_DistListMemberOf($aRecipient[1][2])
If @error Then
Debug("distlistmemberof", @error)
Else
Debug($dist_lists)
EndIf
 
_OL_Close($oOutlook)
 
Dim $exchange_membership[1]
 
If UBound($dist_lists) - 1 > 1 Then
For $x = 1 To UBound($dist_lists) - 1
$dist_list = $dist_lists[$x][1]
$managed_by = ""
$description = ""
 
$array = _AD_GetObjectsInOU("", "(ANR=" & $dist_list & ")", 2, "displayName,sAMAccountName")
 
$group_found = False
 
For $z = 1 To UBound($array) - 1
If $dist_list = $array[$z][0] Then
$group_found = True
$group = $array[$z][1]
ExitLoop
EndIf
Next
 
If $group_found = False Then
$group = "NOT_FOUND"
EndIf
 
$object_properties = _AD_GetObjectProperties($group, "managedBy,description")
 
If Not @error Then
For $y = 1 To UBound($object_properties) - 1
If $object_properties[$y][0] = "managedBy" Then
$managed_by = $object_properties[$y][1]
 
$array = StringRegExp($managed_by, "CN=([\h\w\d_]*).OU=", 3)
 
If Not @error Then
$managed_by = $array[0]
EndIf
 
ContinueLoop
EndIf
If $object_properties[$y][0] = "description" Then
$description = $object_properties[$y][1]
ContinueLoop
EndIf
Next
EndIf
 
ReDim $exchange_membership[UBound($exchange_membership) + 1][3]
 
$exchange_membership[UBound($exchange_membership) - 1][0] = $dist_list
$exchange_membership[UBound($exchange_membership) - 1][1] = $managed_by
$exchange_membership[UBound($exchange_membership) - 1][2] = $description
Next
Else
MsgBox(0, @ScriptName, "There were no groups to export.")
EndIf
 
_AD_Close()
 
 
Func Resolve($account)
 
;~  $object_properties = _AD_GetObjectProperties($account, "displayName")
$object_properties = _AD_GetObjectProperties($account, "mail")
;~  Debug($object_properties)
If Not @error Then
For $x = 1 To UBound($object_properties) - 1
If $object_properties[$x][0] = "mail" Then
$AD_display_name = $object_properties[$x][1]
ContinueLoop
EndIf
Next
Else
SetError(1)
Return
EndIf
 
Return $AD_display_name
 
EndFunc   ;==>Resolve
 
Func Debug($variable1 = "", $variable2 = "", $variable3 = "")
 
;~  #include <array.au3>
;~  $msg_normal = 0
 
If IsArray($variable1) Then
_ArrayDisplay($variable1)
Else
If $variable2 <> "" Then
$variable1 &= @CRLF & $variable2
EndIf
 
If $variable3 <> "" Then
$variable1 &= @CRLF & $variable3
EndIf
 
ClipPut($variable1)
MsgBox($msg_normal, "Debug", $variable1)
EndIf
 
EndFunc   ;==>Debug
Link to comment
Share on other sites

Let's create a simple reproducer:

#include <OutlookEx.au3>
#include <Array.au3>
#include <Debug.au3>
_DebugSetup() ; <== Add for AutoIt > 3.3.8.1
_DebugCOMError() ; <== Add for AutoIt > 3.3.8.1
Global $oOutlook = _OL_Open()
Global $aRecipient = _OL_ItemRecipientCheck($oOutlook, "firstname.lastname@company.country")
Msgbox(0, "Error", @error)
_ArrayDisplay($aRecipient)
_OL_Close($oOutlook)

This works fine on Windows 7 64 bit and Office 2010 32 bit. Tested with Autoit 3.3.10.2 and 3.3.11.3 both when Outlook was running and when it was closed.

Can you please test with 3.3.10.2 and post the results?

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

 

Link to comment
Share on other sites

That's why I added the comment "<== Add for AutoIt > 3.3.8.1". ;)

Remove the lines for 3.3.8.1.

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

 

Link to comment
Share on other sites

oops sorry.

outlook closed

==========

i get error 0 and a 6 column array

outlook opened

============

i got a security box dialog - saying allow connection for .. 1 min..10 min.. etc...

that may be the reason!

i hit allow and now i cant get that security box again - doh!

i see that theres syntax for _OL_Open addressing this... should i run it this way _OL_Open(True,"",3000)

?

Link to comment
Share on other sites

You have to create _OL_Warnings.exe (or the name you want to use) by compiling _OL_Warnings.au3.

WARNING; THIS EXAMPLE SCRIPT IS JUST A TEMPLATE.

You need to modify it depending on the Outlook version and language you use!

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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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