Jump to content

OutlookEX UDF


water
 Share

Recommended Posts

Yeah checking in the users registry would be my next solution. I just wanted to check if the UDF could solve this, as that would be more reliable I guess :)

The script is started when a user logs in (from the logon script), so it runs before the user has opened "Outlook.exe" So that won't do.

Using FileExist won't do either, since the path can be different for some users. Outlook 2013 is placed in folder "Office15" etc etc. Of course I could check this or that, but again, not 100% reliable.

I think that either _OL_Open in the beginning of the script, or a check in the registry will be the soloution.

Again, thanks a lot for all your effort with this UDF! It is essential for my scripting! :)

Link to comment
Share on other sites

Glad you like the UDF :)

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

Easy solution :)

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

Hi water :)

In order to use the OutlookEX functions,

"Global $oOutlook = _OL_Open()" has to set first,
and "_OL_Close($oOutlook)" has to be set after.

1. But is it necessary if the application Outlook.exe itself is already running, when the OutlookEX functions are used?

2. Does "_OL_Close($oOutlook)" really have a function here, or is it unnecessary? I mean what happens if _OL_Close isn't used after an OL_Open ?

 

Thanks
David

 

 

 

Link to comment
Share on other sites

_OL_Open is needed to start Outlook OR to connect to an already running instance. 

_OL_Close is needed to shutdown Outlook if started by _OL_Open. Else cleanup is being done when the script exits. 

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

Ah okay that clarifies it :)

The reason I ask is because of some observations I've made.

I have a script that runs with the logon script. The script itself runs for about 15 seconds, and calls an _OL_Open / _OL_Close at some point.

If Outlook was already fully loaded and running when the _OL_Open is called, then no problem, Outlook keeps running, even when _OL_Close is called.

If the user opens Outlook, and the _OL_Open is called DURING the load of Outlook, it will cause Outlook to close when the OL_Close is called.
(I have no idea why)

If I don't use _OL_Close at all, and just let the script finish, Outlook will not close, even if OL_Open is called during the load of Outlook.

So that's why I was interested in knowing whether _OL_Close is needed or not.

I hope it makes sense :)

Thanks

 

EDIT: Okay I just tried without both _OL_Open and _OL_Close, and the function still works! Even if Outlook.exe wasn't running. So now I'm just confused :)


The OutlookEX function I am using here is _OL_MailSignatureSet.

Is it because that the UDF itself calls _OL_Open and _OL_Close , and I don't have to do it in my own script?

Edited by david1337
Link to comment
Share on other sites

@water

Hi Water,

I have a problem with opening a single occurence of a recurring meeting.

When I use _OL_ItemDisplay($oOL, $entryID) I always get the series opened, but i need a specific occurrence.

This problem is beyond UDF EX, since all recurring meetings have the same entryID in Outlook.

The one thing that is different is the Start Time of each occurrence, but the problem is that _OL_ItemDisplay requires entry id to work.

My question: Is there a way to use _OL_ItemDisplay with given StartTime w/o entryID??

Thanks!!

Link to comment
Share on other sites

This VB code snippet describes how it works (taken from https://msdn.microsoft.com/en-us/library/office/ff868441.aspx):
Means:

  • Grab the mast appointment item
  • Get the recurrence information for this appointment
  • Get a specific date form the recurrence pattern
     
'Access the items in the Calendar folder to locate 
 'the master AppointmentItem for the new series. 
 Set myNamespace = Application.GetNamespace("MAPI") 
 Set myFolder = myNamespace.GetDefaultFolder(olFolderCalendar) 
 Set myItems = myFolder.Items 
 Set myApptItem = myItems("Meet with Boss") 
  
 'Get the recurrence pattern for this appointment 
 'and obtain the occurrence for 3/12/03. 
 myDate = #3/12/2003 3:00:00 PM# 
 Set myRecurrPatt = myApptItem.GetRecurrencePattern 
 Set myOddApptItem = myRecurrPatt.GetOccurrence(myDate)

 

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

4 hours ago, david1337 said:

EDIT: Okay I just tried without both _OL_Open and _OL_Close, and the function still works! Even if Outlook.exe wasn't running. So now I'm just confused :)


The OutlookEX function I am using here is _OL_MailSignatureSet.

Is it because that the UDF itself calls _OL_Open and _OL_Close , and I don't have to do it in my own script?

I just checked the _OL_MailSignatur* functions. They do not use Outlook to work with the signature but the Word object :)

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

Welcome to AutoIt and the forum!

I'm glad you like the UDF :)
Unfortunately you can't specify the calender with this function. It was made to be a simple wrapper for the same function taken from the "old" Outlook UDF written by Wooltown.
Grab all _OL_* functions from _OL_Wrapper_CreateAppointment and add them to your script. At the top add _OL_FolderAccess to access the needed calendar and then pass the result to _OL_ItemCreate.

Example script _OL_ItemCreate.au3 should give you an idea.

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

Yes, an editor is needed. 

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

Hi water,

I'm trying to fire a Autoit function (to trigger further automation) when I recieve an email, but cannot find a function for it. Is this supported in the UDF?

Thanks,

-twitchy

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

Yes, it is :)

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

Check the Outlook Example Scripts thread for _OL_Example_NewMail_Event.au3

 

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

12 minutes ago, water said:

Check the Outlook Example Scripts thread for _OL_Example_NewMail_Event.au3

Whoa totally missed that! Thanks! Any idea where I can get a list of the other properties of the oOL_Item object? (ie: $oOL_Item.SenderName, couldnt find a list in the URL linked in the example code), or even better, is there a way to print it out in autoit (like python's dir function)?

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

Link to comment
Share on other sites

1 minute ago, twitchyliquid64 said:

Whoa totally missed that! Thanks! Any idea where I can get a list of the other properties of the oOL_Item object? (ie: $oOL_Item.SenderName, couldnt find a list in the URL linked in the example code), or even better, is there a way to print it out in autoit (like python's dir function)?

Think I found it unless I am mistaken?

https://msdn.microsoft.com/en-us/library/bb176688(v=office.12).aspx

ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...