Jump to content

Outlook Resolveall


Recommended Posts

I'm trying to create a simple outlook function that validates the email addresses before sending. I'm trying adapt this script:

https://msdn.microsoft.com/EN-US/library/office/ff867165.aspx

 

Func SendEmails()
    $olApp = ObjCreate("Outlook.Application")
    $olMailItem = 0
    $objMail = $olApp.CreateItem($olMailItem)
    With $objMail
        .Save
        .Subject = ("TEST")
        .Display
        $oRecipients=.Recipients
    EndWith
    With $oRecipients
        .Add("User1")
        .Add("User2")
        If not .ResolveAll Then
            For $z In $oRecipients
                If not .Resolved then MsgBox(0,"",.Name)
            Next
        EndIf
    EndWith
EndFunc

I'm only trying to capture the message box because the resolveall function doesn't seem to be doing anything. I tried using the above script and it works up to the resolveall statement but it doesn't seem to do anything. I was hoping putting the message box in would help me figure out what is going on, but I'm getting errors on .Resolved.

 

Anyone used the Resolveall function before?

Link to comment
Share on other sites

Why don't you have a look at my OutlookEX UDF? Function _OL_ItemRecipientAdd or _OL_ItemRecipientCheck?

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

The link in my signature correctly transfers me to the OutlookEx thread. When scrolling down a bit you will find the ZIP file.
Here is the direct download link:  https://www.autoitscript.com/forum/applications/core/interface/file/attachment.php?id=44687

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

Excellent! I don't see the zip file in the thread... I've been having issues on the boards with content not showing up (as you might have noticed with the last few posts).

 

Thanks!

Link to comment
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
 Share

×
×
  • Create New...