Jump to content

OutlookEX UDF - Help & Support (IV)


water
 Share

Recommended Posts

After struggling for a while, I was able to get _OL_ItemMove to work.  However, I want to understand why what I did worked.

Old Code

$TargetFolder = _OL_FolderAccess($oOutlook,"First.Last@Company.com\Inbox\Processed",$olFolderInbox)
$oItem = _OL_ItemMove($oOutlook, $aItems[1][2], Default, $TargetFolder)

Working Code

$TargetFolder = _OL_FolderAccess($oOutlook,"First.Last@company.com\Inbox\Processed",$olFolderInbox)
$oItem = _OL_ItemMove($oOutlook, $aItems[1][2], Default, $TargetFolder[1])

I didn't know $TargetFolder was an array.  Also, I don't understand why it's [1].  When I display the array the target folder shows up on row 5.

Link to comment
Share on other sites

That's why I always suggest to read the help file ;)
Element 1 of the returned array holds the folder object, element 5 holds the folderpath.
_OL_ItemMove can handle the folder object and the folder name.

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

  • 1 month later...

Hello water,

I am trying to use "_OL_ItemAttachmentSave" to download .pdf attachments (one per email) from a folder in my Outlook 2010 containing 100 emails.

Is this possible to do using your UDF?

Thank you for your time and any suggestions and/or examples you can provide.

taurus905

"Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs

Link to comment
Share on other sites

I would try to create a new item using _OL_ItemCreate and specify the mail file as template. Then process the returned mail item as needed and when finished delete the created item.
Haven't tested this approach, so it might be buggy ;)

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

  • 4 weeks later...

Hi water

First-I want to thank you for this UDF. I have used it for years as part of a system scan/backup report generation AutoIt program for crystal reports script-to run and send backup reports when the primary system fails as well as results for system scans for a major hospital group in Michigan.

I've looked - and am unable to find the answer to a question.

We are being pressed to upgrade to Outlook365 - I was wondering if you know if the current version will work with Office 365's Outlook- simple functions like sending an email with a body and attaching files.  Beyond that, I don't use any of the functionality in the UDF.

 

thank you again for the UDF!

Link to comment
Share on other sites

I'm not sure the cloud based Office365 offers a COM interface.
I have no Office365 available so can't test.
If you can test, try:

#include <OutlookEX.au3>
Global $oOutlook = _OL_Open()
MsgBox(0, "_OL_Open", "@error = " & @error & ", @extended = " & @extended)

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 hours ago, water said:

I'm not sure the cloud based Office365 offers a COM interface.
I have no Office365 available so can't test.
If you can test, try:

#include <OutlookEX.au3>
Global $oOutlook = _OL_Open()
MsgBox(0, "_OL_Open", "@error = " & @error & ", @extended = " & @extended)

 

this one is when Outlook is open

Capture.PNG.e0ecf40306b271606443f23ed005ee96.PNG

 

 

this one is when outlook is closed

Capture2.PNG.c138fc5b1f82b5a2a25bf69c130e6b03.PNG

outlook 365 installed and operational. if you have more test code you want to try, let me know.

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

Looks good. So I think everything else should work as well :)

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

Version 1.3.4.0 of the UDF has been released.

  • General code enhancements
  • FIXED BUGS: _OL_PSTAccess: On error 4 Exit was used instead of Return. So this error ended your whole script.
  • CHANGED FUNCTIONS: _OL_PSTAccess: Now works with PST-files on network drives, though it is not recommended by Microsoft.
    Internal function __OL_PSTConvertUNC added to convert PST filepaths to UNC notation.

Please test before using in production!

For download please see my signature.

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

Hi

Concerning OutLook and RTF email, I have the following:

Rich Text Format (RTF) Specification
Version 1.9.1 

which can be downloaded from Microsoft in .doc and .docx format. (sic) Not in RTF, funny that,

pages 63-71 indicate that a compliant RTF interpreter will convert Mail Merged RTF documents into HTML and pass the object to Outlook if the merge Destination is email. 

It appears that Outlook (not the UDF, the Microsoft Application) cannot send RTF email in native format.  Outlook sends email in HTML format.

Which probably indicates that our attempts at sending RTF email is futile.

Quote

\mmdestemail

Specifies that conforming hosting applications shall generate emails using the documents that result from populating the fields within a given merged RTF document with data from the specified external data source.

Skysnake

Edited by Skysnake

Skysnake

Why is the snake in the sky?

Link to comment
Share on other sites

Sorry, I don't see how this is related to the OutlookEX UDF :huh:

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

This means you do not use the OutlookEX UDF at all?
How do you try to select the first email of your inbox? Post the code please.

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

Sure, (I used dll library because I write in c# )

public void Outlook()
        {

            autoit.Run("C:\\Program Files (x86)\\Microsoft Office\\Office15\\outlook.exe");
            autoit.WinActivate(MessageText);
            
            string windowName = "Inbox - ";
            int found = autoit.WinWait(windowName, "", 10);
            if (found != 0)
            {
                autoit.WinActivate(windowName);
                
                autoit.Send("{ENTER}");
                autoit.Send("{TAB}");

            }
        }

Link to comment
Share on other sites

I see.
Then I think the following forum is the best place to get some help: https://www.autoitscript.com/forum/forum/14-autoitx-help-and-support/

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

  • 4 weeks later...

What is the shorder way to send an email with X subject and Y body please ?

To be a bit more explicit make an email in my script directly or in hdd and then send it. the mail whould be very shord so it can be from my script.

 

Just need function orders please thanks

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • 4 months later...

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

Hello.  I would like to use your UDF to automate some simple Outlook tasks.  I am getting started, and have a few specific questions about one of your functions and its parameters. Would this be the place to ask?

My specific question is in relation to the _OL_ItemCreate() function.  The first parameter it takes is $oOL, which is defined as, "the Outlook object returned by a preceding call to _OL_Open()."  But in my case, I have not explicitly called _OL_Open().  In my case, Outlook has already been opened manually.  So what do i specify for $oOL here?

I tried explicitly calling _OL_Open().  But when I did so while Outlook was already opened, it seemed to cause issues.  Namely, the script remained 'paused' in my systray, and no code after _OL_Open() seemed to execute.  Perhaps I am misunderstanding something though.

Thanks.

Link to comment
Share on other sites

This is definitely the place to ask questions :)

_OL_Open needs to be the first function to call in a script. If Outlook is already running then _OL_Open connects to this instance, else a new instance of Outlook is being created.

Can you please post your script (or at least the part where you call _OL_Open)?

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

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