Jump to content

OutlookEX UDF - Help & Support (IV)


water
 Share

Recommended Posts


@water another question.

Create a new email message with text including markup. Have you ever tried that? My body gets inserted, but all html gets stripped/converted to plain text.

Any examples I could look at?

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

My UDFs only work with the on premise versions of Microsoft programs.
The cloud versions use a completely different interface so my UDFs will become useless when you move to the cloud.

Seems to be an old example as CommandBars have been replaced with Ribbons. Please see: https://docs.microsoft.com/en-sg/office/vba/outlook/how-to/office-fluent-ui-extensibility/updating-earlier-code-for-commandbars

When you follow the links you'll see that implementing the Ribbon interface can become quite tricky.

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...
8 minutes ago, Skysnake said:

As far as the command bar question is concerned. My attempt is focussed on the individual inspectors, not the actual menu bar.

But the example you posted uses CommandBars.
What do you try to achieve? Adding the button is just a small part of the story. You need to run some code when the user clicks the button.
What have you tried so far?

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

On 5/28/2021 at 8:02 PM, Skysnake said:

Create a new email message with text including markup.

How do you create the mail item and how to do you add the text/markup?

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

  • 5 weeks later...

Hello,

I've turned on error logging to file. Below is an example of an error in the log

When I google the NumberHex value I get a lot of hits on Registry issues

How do I identify what is causing the issue , Scriptline 367 is a blank line in my script

 

COM Error Encountered in debug.au3
UDF version = 
  OutlookEX_Base: 1.2.3.0 2020-12-10
  OutlookEX: 1.6.3.1 2020-12-15
@AutoItVersion = 3.3.14.5
@AutoItX64 = 1
@Compiled = 0
@OSArch = X64
@OSVersion = WIN_10
Scriptline = 367
NumberHex = 0x80020009
Number = -2147352567
WinDescription = Exception occurred.
Description = 
Source = 
HelpFile = 
HelpContext = 0
LastDllError = 0

Link to comment
Share on other sites

0x80020009 is a general error

As line 367 is a comment line in OutlookE.au3 and OutlookEX_Base.au3 we need to see your script before we can give further advice.

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

Hi community

As suggested, I relate my problem here and allready found 50% of my solutions browsing the whole thread

I needed to send an email with a different email addresse than my personnal one, in such case a mail box with delegation

The solution seems to use 

Local $oOutlook = _OL_Open ( )
Local $oMail = _OL_ItemCreate ( $oOutlook, $olMailItem, "", "", "Subject=" & $Object )
$oMail.BodyFormat = $olFormatHTML
$oMail.GetInspector
$Signature = $oMail.HTMLBody
$oMail.HTMLBody = "test" & $Signature
$oMail.To = $Dest
$oMail.SentOnBehalfOfName = "it-group@domain.fr"
_OL_ItemSend ( $oOutlook, $oMail )

I'd like to pick all delegation mail box to allow the user to select which one will be used to send an email

I used _OL_StoreGet ( $oOutlook ) that did the job, but I got an alias fro delegation boxes instead of an email address

How is it possible please to get the email address of each alias ?

Or, is there a way to sent a mail using alias ( Did a try and it fails )

Here's content of _OL_StoreGet ( $oOutlook )

Regards

 

Store.png.png

Edited by Nicolas57
Link to comment
Share on other sites

What you get from _OL_StoreGet in Col 0 are the displaynames of the mailboxes.

Could you please try _OL_AccountGet?

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

@HighlanderSword

How do I identify what is causing the issue , Scriptline 367 is a blank line in my script

Bear in mind that any includes will appear first, followed by your code. This means that line 367 is the final, running script, not necessarily the code you wrote. Can you simplify and reproduce? Obviously something is causing this, we just need to know where to look

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

  • 1 month later...

@water thank you so much for this UDF, I've used it to automate sorting operations and taks creation in my on-premise installation of Outlook. I was wondering if I could get your advice on something: I've been trying to find a function in the UDF that would trigger Outlook to receive new e-mails from my POP3 accounts that have been added as PST files. Currently, all my functions can sort, perform RegExp searches etc on mails that have been downloaded already, but I have to wait for Outlook to do its scheduled send/receive to retreive new mails from the mailserver. Is there any function in your UDF (or another) that can trigger a fresh send/receive command?

Thanks again.

 

EDIT: I'm such a dumbass I missed the _OL_Sync function :) Anyway, the script's working perfectly now :)

Edited by noellarkin
stupidly missed _OL_Sync
Link to comment
Share on other sites

According to this book (for Outlook 2007) Events only get raised for the default Store: https://books.google.at/books?id=DnxuBDWM9E4C&pg=PT628&lpg=PT628&dq=outlook+newmail+event+pst&source=bl&ots=-KtR7m1OOe&sig=ACfU3U1ADmVjwghXFcXGMGrJa_V9gz21Aw&hl=de&sa=X&ved=2ahUKEwiH6bHRxMHyAhX3gf0HHeCPBiMQ6AF6BAgXEAM#v=onepage&q=outlook newmail event pst&f=false

But I'm not sure this is still true.
Maybe this sheds some light onto the subject: https://docs.microsoft.com/en-za/office/vba/api/outlook.application.newmailex

I think it should work with PST as with any other folder.

Did you test the NewMailEX example script provided with the UDF?

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 misinterpreted your question. After re-reading I understand that _OL_Sync is the best solution :)

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

Hi,

Are there any who can help me with:
select the oldest mails first.
and script not always printer. 

I have made a script that uses OutlookEX UDF.
To look in an Outlook folder for mails,
when it finds one, it checks if the email contains any attachments. as it stores a folder.
Then it sorts the files, based on an array of file types (.pdf, .doc, .docx,
and print those files.

Are there any of you who can explain to me why my script does not always print. whether one can make a check for print

And how can I get it to always select the oldest mails first? 

 

I do not know if I am using some of the features incorrectly.
but it seems to work some of the time. 

Edited by Melba23
Merged posts
Link to comment
Share on other sites

  • Moderators

Andrue,

Welcome to the AutoIt forums.

But in future, please stick to just the one thread.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

On 9/9/2021 at 3:16 PM, Andrue said:

Are there any of you who can explain to me why my script does not always print. whether one can make a check for print

Your code is a bit difficult to follow, maybe take a look at some of the coding practices we use, but this is understandable if you're new :)

One reason could be that you're using _ArrayBinarySearch, which requires that the array is sorted beforehand. I'd suggest using _ArraySearch instead.

Also, it's vital that you check @error values immediately after calling a function. If you call any other function, the value will be reset.

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

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