Sign in to follow this  
Followers 0
Wooltown

Outlook UDF

207 posts in this topic

3 New functions

_OutlookDeleteNote - New 2009-03-05 - Delete a note

_OutlookDeleteTask - New 2009-03-05 - Delete a task

_OutlookGetDistLists - New 2009-03-05 - Get the contents of one or more distribution lists

Share this post


Link to post
Share on other sites



2 New functions:

_OutlookDeleteTask - New 2009-03-06 - Delete a task

_OutlookModifyTask - New 2009-03-06 - Modify a Task

Share this post


Link to post
Share on other sites

#23 ·  Posted (edited)

I seem to be getting some errors with the outlook.udf

Outlook.au3(898,22) : WARNING: $sNewCategories: possibly used before declaration.
        If $sNewCategories <>
        ~~~~~~~~~~~~~~~~~~~^
Outlook.au3(899,17) : WARNING: $iNewColor: possibly used before declaration.
        If $iNewColor <>
        ~~~~~~~~~~~~~~^
Outlook.au3(910,5) : ERROR: syntax error
    EndWith
~~~~^
Outlook.au3(898,22) : ERROR: $sNewCategories: undeclared global variable.
        If $sNewCategories <>
        ~~~~~~~~~~~~~~~~~~~^
Outlook.au3(496,100) : ERROR: _OutlookFindRootFolder(): undefined function.
        _OutlookFindRootFolder($oFolder,$sRootFolderName,StringMid($sFolder,StringInStr($sFolder,"\")+ 1))
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~^
Outlook.au3(498,126) : ERROR: _OutlookFindMailInTree(): undefined function.
    _OutlookFindMailInTree($asMail, $oFolder, $sRootFolderName, $fSubFolders, $sFrom, $sTo, $sCc, $sBCc, $sSubject, $iImportance)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\cstamand\Desktop\outlook\OutlookDemo.au3 - 4 error(s), 2 warning(s)

I was able to fix much of the issues. I added the With where it was suppose to go and local'd the variables properly. Is there a way to check for new email and read the title and subject?

Edited by kickarse

Share this post


Link to post
Share on other sites

I was in a little hurry last friday, I will correct the errors and submit an update.

Using _OutlookGetMail you can search for all mail in a folder, in the resulting array you can see which mails are unread, I can add a parameter to search for only unread if you wish.

I prefer not to use With - EndWith, If I have a Return in the middle of an With - EndWith, you will have problems.

Share this post


Link to post
Share on other sites

Kickarse - errors corrected, and added a parameter in _OutlookGetMail to only return unread mails.

Share this post


Link to post
Share on other sites

A handfull of more functions will come soon, together with better DemoFiles.

Share this post


Link to post
Share on other sites

5 new functions added today, 7 Demo files, categorized in the different areas.

Share this post


Link to post
Share on other sites

Will this work for all versions of Outlook?

Share this post


Link to post
Share on other sites

I think so, have tested on 2003 and it works, but for some reason it is extremly slow, when reading contacts Outlook consumes 50% of the CPU

Share this post


Link to post
Share on other sites

#32 ·  Posted (edited)

I can confirm that it works for Outlook 2007 aswell :D

Would it be possible to include the body and category of an appointment in the _OutlookGetAppointments array?

Thanx for a great UDF!

*Edit*

I solved the problem, i just replaced:

$avAppointments[$avAppointments[0][0]][4] = $oItem.AllDayEvent
$avAppointments[$avAppointments[0][0]][5] = $oItem.Importance
with

$avAppointments[$avAppointments[0][0]][4] = $oItem.Body
$avAppointments[$avAppointments[0][0]][5] = $oItem.Categories

the importance and all day-info isn't vital in my applyance.

Edited by faldo

Share this post


Link to post
Share on other sites

Or you could increase the array and include more information.

Share this post


Link to post
Share on other sites

Or you could increase the array and include more information.

Indeed... my suggestion would be to include more columns in the original UDF, if you have the time :D

Share this post


Link to post
Share on other sites

I can do it, but do you wish to have more than Body and Categories ?

Share this post


Link to post
Share on other sites

I'm creating a syncronisation-tool for the employees of my company so they can use the calendar in outlook to specify the time they've worked and then push a button to send it all to the economy/timestamp database, that way they don't have to enter the same info twice.

So in my specific case, those two colums would be enough :D

Share this post


Link to post
Share on other sites

OutlookGetAppointments updated, new version uploaded !

Share this post


Link to post
Share on other sites

I would like to check the mail and then save all the attachments to a directory and then delete the msg. Is this possible with this udf?

Share this post


Link to post
Share on other sites

I suggest you try it out... if you get stuck, post your problem along with your code.

Share this post


Link to post
Share on other sites

I would like to check the mail and then save all the attachments to a directory and then delete the msg. Is this possible with this udf?

Yes it is, just check all the examples.

Share this post


Link to post
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
Sign in to follow this  
Followers 0