Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

OutlookEX UDF


  • Please log in to reply
418 replies to this topic

#1 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 08 March 2011 - 10:16 AM

*
POPULAR

Based on the Outlook UDF written by wooltown, we (wooltown and I) decided to extend the functionality of the Outlook UDF.
As the OutlookEX UDF ("EX" like "extended") has a completely different approach compared to the Outlook UDF it's a complete rewrite.

We would like to discuss the design of the UDF with the community. Every feedback, function request etc. is highly welcome.
As soon as the discussion shows that we are on the right track we would like to release an alpha version for everyone to test.

So please don't be shy and post what you think of this UDF or what functions you need!

  • Every item in Outlook is uniquely identified by EntryID and StoreID. The default StoreID is your inbox
  • Every item has properties to describe the item (subject, startdate ..) and methods to act upon the item (move, delete …)
  • The search and action functions are now separated. As an example the user first searches for the items to be deleted and then calls the delete function
  • If a method can be used for more than one item type (e.g. mail, calendar and notes) the function is called _OL_ItemXXX else the function is called _OL_CalendarXXX
  • The number of properties you can get or pass to most functions is not limited by the number of parameters defined for the function.
    Properties can be passed as parameters (up to 10) or in an unlimited array as parameter 1
  • The UDF allows to access all kind of folders (see the following listing). Folders can be passed by name or as an object to a function
  • A lot of testing is still needed as we have written and tested the functions using Outlook 2002 SP3 and Outlook 2010

"wrapper" or "shortcut" functions will be available to let you do all tasks in one go e.g. _OL_Wrapper_SendMail for all functions above.

Documentation:
The documentation for this UDF (aside from the docu in the UDF itself) will be placed in the AutoIt Wiki.
So we can easily modify the docu without releasing a new version each time.
There will be pages describing the UDF in general and pages for individual item types (like mail) with
detailed information and a lot of tips & tricks.

Starting point: http://www.autoitscript.com/wiki/OutlookEX_UDF_-_General

2014-07-27: Version 1.0.0.0
As always: Please test before using in production!

KNOWN BUGS (last changed 2014-09-30)

  • _OL_ItemRecipientAdd: When passing the recipient(s) as objects parameter $iType is ignored. This way you can't set CC or BCC recipients.
    Thanks to NewProgger from the german forum for pointing me to this bug.

 

Spoiler

Attached File  OutlookEX 1.0.0.0.zip   350.88KB   638 downloads
Attached File  History.txt   21.77KB   120 downloads


Edited by water, 30 September 2014 - 07:28 AM.

  • footswitch, SeF, motormad and 4 others like this
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki







#2 Wooltown

Wooltown

    Alpha Geek

  • Active Members
  • PipPipPipPipPipPip
  • 478 posts

Posted 08 March 2011 - 02:22 PM

This is a nice implementation, it will make the maintenance of the code easier in the future and hopefully less errors.

#3 picea892

picea892

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 696 posts

Posted 08 March 2011 - 02:36 PM

Hi Water
Did you attach the UDF or provide a link?
  • Crayfish likes this

#4 Wooltown

Wooltown

    Alpha Geek

  • Active Members
  • PipPipPipPipPipPip
  • 478 posts

Posted 08 March 2011 - 02:46 PM

---

Edited by Wooltown, 08 March 2011 - 02:48 PM.


#5 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 08 March 2011 - 03:00 PM

Hi Water
Did you attach the UDF or provide a link?

Not yet.
As a first step we wanted to discuss the concept and gather requests from the community.
Then in a second step we wanted to provide the code we have so far for playing and testing .

The functions available so far can be found in the attached thumbnail.

Or do you think we should post the code right now and then talk about it?

Edited by water, 08 March 2011 - 03:05 PM.

UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#6 picea892

picea892

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 696 posts

Posted 08 March 2011 - 04:09 PM

No, this is great, my mistake.
Seems like you two have done some good prep-work already and are well on your way to having it done. I'm very interested in supporting this project, let me know how I can help.

Your approach seems sound. I have an idea that may or may not fit into your plans.

An Is-busy function. Essentially a query for a calendar whether a specific timeslot has a scheduled appointment or not. This may seem easy, however when you query a calendar you get all entries in the calendar and the reoccurence type etc. can cofuse things pretty quickly.

Not on your list, There is also an appointment item "conflict" that can be queried (if two things are scheduled at same time)

I have a pretty good VBA function for item2task if you want a copy....I see you have it listed as unfinished.

Anyways, I'll keep tabs on this post and see what develops. Looking forward to seeing your work.

Picea892

#7 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 08 March 2011 - 04:20 PM

Hi Picea892,

An Is-busy function. Essentially a query for a calendar whether a specific timeslot has a scheduled appointment or not. This may seem easy, however when you query a calendar you get all entries in the calendar and the reoccurence type etc. can cofuse things pretty quickly.

The _OL_RecipientFreeBusyGet function should do what you want. It answers a question like "Does John Doe have some free time today between 09:00 and 11:00 for a 30-minute meeting?" You use _OL_RecipientFreeBusyGet to query the user for the interval in steps of 30 minutes and get a string where each character represents 30 minutes. Each character shows if the user is free, busy or whatever.

Not on your list, There is also an appointment item "conflict" that can be queried (if two things are scheduled at same time)

Good idea, I will put it on the todo list.

I have a pretty good VBA function for item2task if you want a copy....I see you have it listed as unfinished.

If you like you can post it here or send it to me via PM.

I think we will post some code to play with as soon as we have the example scripts finished for every function.
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#8 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 09 March 2011 - 11:07 AM

OK, here is something for you to play with. Be aware that it's an early alpha version!

  • Every example script (except the _OL_BarXXX scripts) delete and recreate a folder "Outlook-UDF-Test" plus subfolders and items in your inbox. So every example script has the same test environment
  • The _OL_BarXXX scripts create groups and shortcuts in your OutlookBar. The delete functions aren't available yet - so you have to delete them yourself
  • The scripts have been written and tested with Outlook 2002 SP3 on Windows XP SP3 - don't know if they all run with newer Outlook versions
  • One wrapper function _OL_MailSend has been finished. It puts together the necessary function calls to send an EMail - just to simplify live!
  • The OutlookEx.pdf lists the available functions. All _OL_ItemXXX functions list for which type of item they are available (mail, appointment ...)
Please first start _OL_TestEnvironment.au3 to set up the test environment (at least set the "Don't ask" flag).

Please report any errors you find.

Happy testing.

Edited by water, 19 March 2011 - 03:31 PM.

UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#9 Vampie

Vampie

    Seeker

  • Active Members
  • 5 posts

Posted 10 March 2011 - 12:31 PM

Thank you very much :-)

I'll be playing with tasks.

I can assume that when the beta of the release version comes out, the name of functions like _OL_ItemFind won't change ?

Keep going!

#10 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 10 March 2011 - 12:37 PM

Hi Vampie,

correct - the function names will not change. But maybe the number or order of parameters, the return values of the function or whatever seems to make sense.

If you get errors, need more documentation or better examples, or if functions are missing: just drop me a note!

Happy testing!

Edited by water, 10 March 2011 - 12:38 PM.

UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#11 Rigest

Rigest

    Wayfarer

  • Active Members
  • Pip
  • 66 posts

Posted 10 March 2011 - 02:23 PM

Two functions that I missed in the previous UDF were sentonbehalf and send with delay. I've added the following myself in the old Outlook UDF.

    $oMessage.DeferredDeliveryTime = $sDelay     $oMessage.Sentonbehalfofname = $sFrom


I don't know if anyone else will use these functions, but they helped me out :)

#12 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 10 March 2011 - 02:29 PM

With the new UDF you can pass this properties to the _OL_CreateItem function:
; Create a html mail plus two attachments. ; Set the properties to send on behalf and send deferred. ; ***************************************************************************** $oItem = _OL_ItemCreate($oOutlook, $olMailItem, "*\Outlook-UDF-Test\TargetFolder\Mail", "", _ "Subject=TestMail", _ "BodyFormat=" & $olFormatHTML, _ "HTMLBody=Bodytext in <b>bold</b>.", _ "DeferredDeliveryTime=" & $sDateTime, _ "Sentonbehalfofname=" & $sFrom)

Edited by water, 16 March 2011 - 08:07 AM.

UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#13 Rigest

Rigest

    Wayfarer

  • Active Members
  • Pip
  • 66 posts

Posted 10 March 2011 - 03:35 PM

Oh very nice. I'm really glad that you guys are improving this UDF. I would really like to make a contribution but I'm afraid that my programming skills are not good enough (yet). I do want to wish all of you guys goodluck with this project.

#14 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 10 March 2011 - 03:43 PM

Hi Rigest,

if you want to add something to this little UDF then you could do some testing, report spelling or grammatical errors (as you will have noticed neither wooltown nor I are native speakers), tell us about missing functions etc. etc.

The UDF is very modular but on the other hand you could need to call 5 or 6 functions to get a task done. We now write some wrapper functions that make it easier for the beginner to get a task done.
_OL_Wrapper_MailSend is available so far. If you need further wrapper functions, please let us know.

Edited by water, 12 March 2011 - 07:03 PM.

UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#15 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 14 March 2011 - 08:27 PM

42 downloads and no comments :)
Don't be shy, post what you think about the UDF, what you like, what you don't like, what's missing etc. etc. ......
We need your input to improve the UDF ...
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#16 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 19 March 2011 - 03:49 PM

Version 0.0.3 has been released.

Please test before using in production!

For download please see my signature.

Edited by water, 19 March 2011 - 03:49 PM.

UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#17 Autobot

Autobot

    Seeker

  • New Members
  • 3 posts

Posted 21 March 2011 - 07:27 AM

Sorry wrong place to put this

Edited by Autobot, 21 March 2011 - 07:35 AM.


#18 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 09 April 2011 - 10:59 AM

Version 0.1.0 has been released.

Please test before using in production!

For download please see my signature.
  • mrpingis likes this
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki

#19 Jaboowaki

Jaboowaki

    Seeker

  • Active Members
  • 41 posts

Posted 28 April 2011 - 02:36 PM

Can someone post an example of this UDF adding a contact and show full list of contacts? Thanks for the help.
Posted ImagePosted ImagePosted ImagePosted Image

#20 water

water

    ?

  • MVPs
  • 15,562 posts

Posted 28 April 2011 - 03:05 PM

1) Adding a contact: Please have a look at _OL_ItemCreate.au3 - example number 2
2) Show full list of contacts: Please have a look at _OL_ItemFind.au3 - example number 1. If you replace '[FirstName] = "TestFirstName"' with "" you should get all contacts of the specified folder.
UDFs:
Active Directory (NEW 2014-07-21 - Version 1.4.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2014-07-27 - Version 1.0.0.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2013-01-21 - Version 0.3.1.1) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
Tutorials:
ADO - Wiki




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users