Jump to content

OutlookEX UDF - Help & Support (IV)


water
 Share

Recommended Posts

When deleting items from an array or collection by index you pass the index numbers from high to low.

To circumvent future problems I could sort the passed indexes so the function correctly deletes them.
I will check other delete functions as well.

What do you think?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

Oh, even just a mention of that in the docs would be great. Embarrassed that I didn't think of that :D

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

I will check how many functions might be affected and will (at least) mention this in the Remarks section of each function or even might do a sorting in the function itself (if it has no side effects).

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

Version 1.4.1.0 of the UDF has been released.

Please test before using in production!

For download please see my signature.

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

Anyone interested in working with Outlook Views?

This allows to create new customized views by selecting fields to be displayed, the way they get displayed (tabel, icons etc.), filter the number of items to get displayed (e.g. only items recieved last week) etc.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

Quote

I'm a god.
You're God ?
I'm a god — I'm not the God, I don't think.

Groundhog Day

I know I'm not Bill Murray, so I'm not a god :D

 

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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...

What the script does: I have an HTML template i am getting, adding an attachment, and sending it setting the recipient value to the filename.  It all works as posted.

Issue:  ItemDisplay shows it correctly, but if I do not use ItemDisplay prior to the send, it sends plain text.

Curiosity: Why does ItemDisplay have an affect on what is sent? 

Questions: Is there another thing I could do that would quietly keep the html?  Should i be doing this differently, im new to the UDF?

#include <OutlookEX.au3>
#include <File.au3>


$aFiles = _FileListToArray(@ScriptDir & "\" , "*.pdf" , 1)

Global $oOutlook = _OL_Open()

Global $TemplateToUse = @ScriptDir & "\Template2.oft"


For $i = 1 to ubound($aFiles) - 1

   Local $oItem = $oOutlook.CreateItemFromTemplate($TemplateToUse, Default)

   $sCurrentUser = stringtrimright($aFiles[$i] , 4)   ; sets the variable to the filename minus ".pdf" - this value in our case is the user alias

   $oItemAttachAdd = _OL_ItemAttachmentAdd($oOutlook, $oItem, Default, @ScriptDir & "\" & $aFiles[$i] , 1)
   
   _OL_ItemDisplay ($oOutlook, $oItem)   ; Why is this necessary to send the HTML -vs- plain text????

   $oItem.To = $sCurrentUser
   $oItem.Send

   $oItem.Close

Next

_OL_Close($oOutlook)

 

 

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

You have to resolve the recipient. Replace

$oItem.To = $sCurrentUser

with a call to _OL_ItemRecipientAdd. Then you can drop _OL_ItemDisplay.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

it sends fine with the alias.  The only issue I have is that I have to use itemdisplay prior to send or it gets sent as plain text to the recipient.  

Can’t figure out why that step is necessary or even how it is effective at accomplishing that.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

No idea. Can you please post the template you use so I can play with it?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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...

Hello @water,

First, thank you for the hard work on this and the Active Directory UDFs, they are really excellent and the examples make them easy to use even for a chimp like me. 🐒

Question: Do you plan to implement follow-up capabilities? I searched in the examples and code and here on the forums but I did not find any solution.

This would be most useful for me as I often send things that are tasks for people to complete and I set a follow up for myself and for the recipient with reminders etc. as shown in the screenshot.....

Follow Up.png

Always carry a towel.

Link to comment
Share on other sites

Interesting find, an issue with Outlook 365. This is not a problem with the UDF but rather an issue with Outlook.

If I create but do not send messages using the UDF, they end up in the drafts folder as expected but they do not have Send, To, CC, or Bcc buttons in the preview pane and it looks like some of the Reminder fields are shown.

1246688925_nosendbutton.png.aca3b077f53c9d25a3e0b13ec4daa8f9.png

But if I open then close the draft, the buttons appear in the preview.

1926434139_nosendbuttonfixedafteropeningandclosing.png.647a12a610c33800be97ccb6ab1fa33c.png

The buttons also appear in the preview pane if I close and restart Outlook (I had parsed a CSV file and generated a lot of mails as drafts so I could set the reminders when I spotted this).

Always carry a towel.

Link to comment
Share on other sites

Glad you like my UDFs :D

I have found a very good article describing follow-up capability and how to use it. Seems the implementation is deprecated and not support by other mail clients.
The article holds some VBA example code to play with.

Having read this article and taking into account that you are the first to ask I'm not sure it is sensible to implement a no longer supported feature.
What do you think?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

1 hour ago, water said:

Having read this article and taking into account that you are the first to ask I'm not sure it is sensible to implement a no longer supported feature.
What do you think?

I wasn't aware this was not supported by mail clients in general. A quick search shows that Thunderbird and Gmail apparently do not support it.

I think for me - or someone in an enterprise where Outlook is the standard mail client - this could be useful, I know more than a handful of people in my organization who do this. But in general I'd have to ask the community what they thought.

Maybe it would be much work for little value. 🙁

In any case, knowing there is not a working solution, for tomorrow I had already blocked out some time to set follow ups manually for 65 mails, as I don't have time to write and debug a script to do it. Maybe for next year when the task comes up again. 🤓

Always carry a towel.

Link to comment
Share on other sites

hmm, .. in HTTP Content-MD5 was depreciated due to poor implementation abroad. I use it to make sure the data is intact. AWS also uses it in it's own API.
My point is that a depreciated standard is not an obsolete one unless a better method is implemented.
If it has use, then is not useless. If the effort is too grate, then that would have to be taken into consideration too, since we are asking for more, not really used abroad, feature.
Just a comment. :) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

I think it is not too hard to translate the code from the article I mentioned above from VB to AutoIt.
But I will not add a function based on deprecated methods/properties to the OutlookEX UDF.
I'm sure people expect reliable code from an UDF. Hence everything else should be kept separate. That's what I have learned from the OOF code :(

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

4 hours ago, water said:

I think it is not too hard to translate the code from the article I mentioned above from VB to AutoIt.

Says you! 😝 I am still a hack, I could not do this easily.

Finding time is hard as I get older -> I have two grandchildren and another on the way. (Not that it's relevant to the topic - I'm just so happy about it I tell everyone). 🤩

Always carry a towel.

Link to comment
Share on other sites

I will play with it and post my findings - as soon as I find some spare time ;)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

Findings so far:

  • You can set the text plus due date for the recipients

Example:

#include <OutlookEX.au3>

; https://codekabinett.com/rdumps.php?Lang=1&targetDoc=vba-outlook-email-flag-aufgabe-erinnerung (Deutsch)
; https://codekabinett.com/rdumps.php?Lang=2&targetDoc=vba-outlook-email-flag-task-reminder (English)

Global $oOL = _OL_Open()
Global $oItem = _OL_ItemCreate($oOL, $olMailItem, "", "", "Subject=TestMail", "BodyFormat=" & $olFormatHTML)

; For Sender:

; For Recipients:
$oItem.FlagRequest="Please review"
$oItem.FlagDueBy="17.03.2020 19:20:00"

$oItem.Display

 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

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