Jump to content

OutlookEX UDF - Help & Support (II)


water
 Share

Recommended Posts

You can't pass the whole array to _OL_DistlistMemberGet. You need to pass the item object:

$aRecipient[1][3]

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

  • 2 weeks later...

I am having a problem - Email will not send when Outlook is not already running.

Using the _OL_Wrapper_SendMail Example 1, everything works flawlessly. However, if Outlook is not running, the script gets hung. I receive no errors in the Scite console. From what I see the script starts the process, the first warning popup comes up and is auto dismissed, I never see the second popup warning. There then appears a Greyed out with X mark Outlook icon in the systray. This will stay there until I break the script. When I open Outlook there is an email in drafts or outbox without a To: Address. or Body. Only the Subject gets put in.

Noticed this version v9.1.0 "With the latest version of the UDF the script runs fine even when Outlook wasn't up and running." and was hopeful but no dice.

I ended up just using ProcessExist and started Outlook if it wasn't running.

Not sure what you changed in v9.1.0 but v9.0.0 is what comes up when you click on your signature.

Link to comment
Share on other sites

_OL_Wrapper_SendMail.au3 automatically starts Outlook if it is not running yet.

The _OL_Wrapper_SendMail.au3 example doesn't support clicking away the Outlook security warning.

Do you get this warning when you manually start Outlook? If yes, can you post a screenshot?

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

  • 2 weeks later...

I do not get the warning when manually sending emails. When I use the OutlookEX with the OL_Wrapper I get the warning boxes. I configured the warning.exe file which successfully clicks the boxes for me.

When I run the wrapper with Outlook Open/running, I get the warning popus, warning.exe clicks through and emails are sent.

When I have Outlook closed/not running. I get the warning popus, warning.exe clicks on the first, I never see subsequent popups [i see 2 popups when Outlook is running] Outlook stays open, grey icon with X in corner. email never sends, it either goes into drafts or outbox with no recipient.

Link to comment
Share on other sites

Which version of Outlook do you run?

Which version of the OutlookEX UDF 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

Absolutely love this UDF.

Can anyone advise on whether it's possible to use _OL_DistListMemberGet , _OL_DistListMemberAdd , _OL_DistListMemberDelete on Global address lists as well as personal distribution lists ?  All the examples I've found relate to personal lists.

I'm using Office Outlook 2003 but am not sure what versuion of exchange we run on the server.

Any pointers would be greatly appreciated.

AJM.

Link to comment
Share on other sites

Welcome to AutoIt and the forum!

Never tried it myself.  This article describes what needs to be done to create a global address list and add users. Looks quite complex ;)

Edited by water

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

  • 3 weeks later...

Here is something odd I just ran into.  Over the weekend our Exchange Admins installed some patches to our exchange server.  Now one of my programs doesn't work completely.  Here is the information.

Before patches

I'm using the OutlookEX.udf and the _OL_Wrapper_Sendmail function.  This function was the most convenient. I just put the email address into the second field in "name@aaa.com; name2@aaa.com;" etc. format.  I then would use _OLWarnings to get through the Outlook warnings and my email would send without a problem. An email like Jane.Doe@aaa.com would resolve in Outlook at Doe, Jane and send.

After Patches

Everything still works in the script except outlook is having a problem with one email address.  The reason for the problem is that there are two people in the GAL with similar names: Doe, Jane (Jane.Doe@aaa.com) and Doe, Jane A. (Jane.A.Doe@aaa.com). Outlook isn't sure how to resolve the address.

If I want the email to go to Jane.Doe@aaa.com Outlook will show in the TO filed as Doe, Jane, which is correct but the email will not send and will sit in the Outbox. If we open the email in the outbox and manually hit send it wants us to choose between the two people in the GAL, Doe, Jane and Doe, Jane A. Once we choose, the name resolves and doesn't have a red line under it.

I'm not sure if this is an Autoit issue or if this is an exchange issue.  I'm leaning towards exchange since the issue was not there last week and only appeared on Monday morning. 

If I cannot get it resolved within the program, my work around would be to get it to open a new email, add the recipients and information automatically and then have the user manually hit the send key to send the email and resolve any issues at that point. This isn't a bad work around for us.

If anyone has any thoughts on this I would appreciate any feed back.  Thanks.

Michael

Edited by Malkavian99
Link to comment
Share on other sites

I do not get the warning when manually sending emails. When I use the OutlookEX with the OL_Wrapper I get the warning boxes. I configured the warning.exe file which successfully clicks the boxes for me.

When I run the wrapper with Outlook Open/running, I get the warning popus, warning.exe clicks through and emails are sent.

When I have Outlook closed/not running. I get the warning popus, warning.exe clicks on the first, I never see subsequent popups [i see 2 popups when Outlook is running] Outlook stays open, grey icon with X in corner. email never sends, it either goes into drafts or outbox with no recipient.

 

I got around this by checking to see if Outlook is running using ProcessExists("outlook.exe") with an if statement at the beginning of the script.  If it isn't running the user gets a message box to start Outlook and the program closes.  I'm sure you could just alter the IF statement to start Outlook if it is not running and then turn it off right before the program closes.  I'm thinking about altering mine that way to avoid the problem in the future.  I have bigger fish to fry at the moment so not high on the priority list.

Edited by Malkavian99
Link to comment
Share on other sites

...

Everything still works in the script except outlook is having a problem with one email address.  The reason for the problem is that there are two people in the GAL with similar names: Doe, Jane (Jane.Doe@aaa.com) and Doe, Jane A. (Jane.A.Doe@aaa.com). Outlook isn't sure how to resolve the address.

Can you set the recipient as "Jane.Doe@aaa.com"? Then the address is unique and Outlook should be able to send it without problems.

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 got around this by checking to see if Outlook is running using ProcessExists("outlook.exe") with an if statement at the beginning of the script.  If it isn't running the user gets a message box to start Outlook and the program closes.  I'm sure you could just alter the IF statement to start Outlook if it is not running and then turn it off right before the program closes.  I'm thinking about altering mine that way to avoid the problem in the future.  I have bigger fish to fry at the moment so not high on the priority list.

If you call function _OL_Open then Outlook is started if it is not already running.

BTW: Which version of Outlook 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

When I create my recipient list they are all pulled in as Jane.Doe@aaa.com; John.Doe@aaa.com; Michael.Doe@aaa.com;.

$Recipients = "jane.doe@aaa.com; john.doe@aaa.com; michael.doe@aaa.com;"

It seems that when Outlook receives the jane.doe@aaa.com address is resolves to the Exchange name of Doe, Jane and that is where it is getting confused as to which one to use because there is a Doe, Jane A. Why Outlook/Exchange is not resolving to the right one automatically I'm not sure.

We are running Outlook 2010 and Exchange Server 2007.

Link to comment
Share on other sites

If you manually create a new mail, enter jane.doe@aaa.com as a recipient and then verify the recipients. Do you get a list of users to select from?

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

Thanks for your help Water.

This was an interesting test.  If Outlook is closed and _OL_Open() is used to open it, there are now warnings and the email address actually resolves and sends.

If Outlook is already open, and it the program hits Local $oOL = _OL_Open(True), I get the warnings, they autocomplete, but the email stays in the outbox.  If it change the line to Local $oOL = _OL_Open(), I still get the warnings, but they don't auotcomplete, and the email stays in the outbox.

I also just noticed I'm not using an _OL_Close statement anywhere in my program, but it seemed to have worked.

Here is a thought. Since it seems to be working with Outlook closed at the beginning. How about we check to see if Outlook is running. If so, I could try doing a force close on Outlook, then run open the connection with _OL_Open(), send the email, close the connection then reopen Outlook with a RUN command before closing the program. 

Thoughts.

Link to comment
Share on other sites

Can you please post the script 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

Here is the latest.  If Outlook is closed I get an RPC service error when it tries to send the email.  It puts a blank email into the drafts folder.

If Outlook is running it leaves the email in the Outbox if it doesn't resolve the person's name. 

This is getting weird.

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...