AutoIt Forums: Outlook UDF - AutoIt Forums

Jump to content

  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Outlook UDF A lot of functions to read/modify items in MS Outlook Rate Topic: ***** 3 Votes

#1 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 09 February 2009 - 04:22 PM

Updated: 2010-01-13 - All With ... EndWith removed.
Updated: 2009-10-29 - _OutlookModifyAppointment() If run 2 times in a row, error: "Outlook.au3 (1534) : ==> Nested "With" statements are not allowed.:"
Updated: 2009-04-17 - OutlookGetMail & OutlookSaveMail, see below
Updated: 2009-03-25 - OutlokGetAppointments, returning more values
Updated: 2009-03-23 - Get rid of Security Warnings when reading/modifying - http://www.mapilab.com/outlook/security/
2009-03-12 - 5 new functions, better DemoFiles grouped in different files.
A draft to an Outlook UDF, tested on Windows 2000 and Outlook 2003

**************************************************************
***** Syntax for the functions, look in Outlook.au3 on each function *****
**************************************************************

24 Functions so far:
_OutlookSendMail - Updated 2009-02-24 - Several attachments didn't work, fixed
_OutlookCreateNote
_OutlookCreateTask
_OutlookCreateAppointment - New 2009-02-11
_OutlookCreateContact - New 2009-02-12 ***** On the General Tab I have failed to find how to set Contacts and Private *****
_OutlookCreateDistList - New 2009-02-17
_OutlookModifyAppointment - Updated 2009-10-29
_OutlookGetAppointments - New 2009-02-24 - Get an Array of all appointments
_OutlookGetMail - Updated 2009-04-17, Change read Status, access root folder, Updated 2009-03-12, Added OnlyReturnUnread, New 2009-02-26 - Get an array of all mail
_OutlookSaveMail - Updated 2009-04-17, Change read Status, access root folder, New 2009-02-27 - Save a mail and it's attachments to the hard disk, The characters \/:*?"<>| which is not allowed in filenames is replaced by _
_OutlookDeleteMail - New 2009-03-02 - Delete one or more mail from a folder
_OutlookGetTasks - New 2009-03-04 - Get an array of all Tasks
_OutlookGetNotes - New 2009-03-04 - Get an array of all Notes
_OutlookGetContacts - New 2009-03-04 - Get an array of all Contacts
_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
_OutlookDeleteTask - New 2009-03-06 - Delete a task
_OutlookModifyTask - New 2009-03-06 - Modify a Task
_OutlookDeleteDistListMember() - New 2009-03-09 - Delete a member in a distribution list
_OutlookDeleteDistList() - New 2009-03-09 - Delete a distribution list
_OutlookFolderExist - New 2009-03-12 - Test if a folder exist
_OutlookFolderAdd - New 2009-03-12 - Add a folder
_OutlookFolderDelete - New 2009-03-12 - Remove a folder


_OutlookDeleteXXXX, _OutlookModifyXXXX - Functions to develop

OutlookWarning.exe renamed to OutlookWarning1.exe
OutlookWarningAddress.exe renamed to OutlookWarning2.exe

In _OutlookSendMail there is a parameter for the entire path for OutlookWarning1.exe, it is necessary because of a security feature in Outlook so a program shouldn't be able to send a mail unnoticed. OutlookWarning1.exe automatically press the Yes-button.

Compile OutlookWarning1.au3 and put it where you would like to have it.

In _OutlookCreateDistList there is a parameter for the entire path for OutlookWarning2.exe, it is necessary because of a security feature in Outlook so a program shouldn't be able to modify addresses unnoticed. OutlookWarning2.exe automatically press the Yes-button.

Compile OutlookWarning2.au3 and put it where you would like to have it.

More features to come if the community is interested.

Attached file: Outlook.zip - 7 Demo files and 3 UDF files

1557 downloads until 2010-01-13

Attached File(s)


This post has been edited by Wooltown: 13 January 2010 - 02:00 PM


#2 User is offline   Paulchen 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 63
  • Joined: 04-August 06

Posted 10 February 2009 - 12:16 PM

Thanks for sharing.

have you a sample, how I can read the calender form other persons?

#3 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 10 February 2009 - 12:31 PM

Calendar functions is under development, in the next release there won't be the functionality to read other peoples calendar.

I will look into it and see how to do it, but of course you must have the rights in the exchange server to read the other person's calendar

#4 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 11 February 2009 - 01:04 PM

Updated with new function: _OutlookCreateAppointment - Create a Calendar event

#5 User is offline   enaiman 

  • Mass Spammer!
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,361
  • Joined: 11-December 06
  • Gender:Male
  • Location:Hobart, Australia

Posted 11 February 2009 - 11:12 PM

Very good job :)

I'm sure it will come in handy in the future.
Thanks for sharing it.

#6 User is offline   skylee 

  • Newbie
  • Group: Members
  • Posts: 1
  • Joined: 12-February 09

Posted 12 February 2009 - 02:50 AM

Thank you for sharing... :lol:

#7 User is offline   rosscoe43 

  • Newbie
  • Group: Members
  • Posts: 3
  • Joined: 06-August 08
  • Location:Pierre, SD

Posted 12 February 2009 - 07:10 AM

I'll be testing this tomorrow, it would be a great addition to a utility I wrote and thanks.

#8 User is offline   robilev 

  • Newbie
  • Group: Members
  • Posts: 4
  • Joined: 02-December 08

Post icon  Posted 12 February 2009 - 11:43 AM

Hi,

Is there a way to change an appointment time

#9 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 12 February 2009 - 12:27 PM

I will look into it in coming updates, next update is Contacts and will be released during the day.

#10 User is offline   timgames 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 18
  • Joined: 06-April 07

Posted 12 February 2009 - 06:25 PM

Add a function that will backup your emails and restore them it would be quite handy because I switch OS a lot. :)

#11 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 18 February 2009 - 11:14 AM

_OutlookCreateDistList addded - Create Distribution Lists and members !

Working on modify of Appointments in Calendar, a little bit problems with recurring events, when I'm trying to modify a single occurence.

#12 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 24 February 2009 - 02:17 PM

_OutlookModifyAppointment - New 2009-02-24 - Modify single or recurring events, at the moment, changing a single event in a recurring appointment doesn't work
_OutlookGetAppointments - New 2009-02-24 - Get all Appointmennts with specific criteria


Look in Outlook.au3 for parameters for each function

#13 User is offline   enaiman 

  • Mass Spammer!
  • PipPipPipPipPipPip
  • Group: Full Members
  • Posts: 1,361
  • Joined: 11-December 06
  • Gender:Male
  • Location:Hobart, Australia

Posted 24 February 2009 - 10:38 PM

Nice job :)

Thank you.

#14 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 26 February 2009 - 11:10 AM

New function: _OutlookGetMail - New 2009-02-26- Get an array of all mails in a folder with or without the subfolders.

This post has been edited by Wooltown: 26 February 2009 - 11:10 AM


#15 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 27 February 2009 - 11:45 AM

New function: _OutlookSaveMail - New 2009-02-27 - Save a mail and it's attachments to the hard disk
OutLookWarning1.au3 - updated 2009-02-27
OutLookWarning2.au3 - updated 2009-02-27

#16 User is offline   Kris123 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 50
  • Joined: 14-November 08

Posted 27 February 2009 - 11:58 AM

View PostWooltown, on Feb 27 2009, 04:15 PM, said:

New function: _OutlookSaveMail - New 2009-02-27 - Save a mail and it's attachments to the hard disk
OutLookWarning1.au3 - updated 2009-02-27
OutLookWarning2.au3 - updated 2009-02-27


Hi Wooltown,

Thanks for ur wonderfull effort, by posting these usefull scripts.
I am trying to use your scripts in my Scripts, by calling your _OutlookSendMail(.....) function with the appropriate parameters.
When i place my parametrs in ur script named Outlook Demo its working fine but when i call from my script then its giving RUN TIME error
"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\AUTO IT\GUI-Inventory\GUI-Inventory-Sending Mail1.au3"
I am not able to locate the problem, Can u help me giving me tips for this problem.
I have added all the header files required.
Please help me...

Thanks in Advance..

#17 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 27 February 2009 - 12:14 PM

Hi !

Not much information regarding the error, but these 3 lines is necessary to send an e-mail, do you have the right path for the include and have you run the -- $oOutlook = _OutlookOpen() -- this is necessary for having an object the other functions can refer to ?

#Include "V:\Source Code\Outlook\Outlook.au3"
$oOutlook = _OutlookOpen()

_OutlookSendMail($oOutlook, "name@domain.com","","", "Header", "The Body Rich Text","c:\temp\xx.txt;c:\temp\aa.txt;c:\temp\bb.txt;c:\temp\cc.txt",$olFormatRichText,"","V:\Source code\Outlook\OutlookWarning1.exe")

#18 User is offline   Kris123 

  • Member
  • Pip
  • Group: Full Members
  • Posts: 50
  • Joined: 14-November 08

Posted 27 February 2009 - 01:21 PM

View PostWooltown, on Feb 27 2009, 04:44 PM, said:

Hi !

Not much information regarding the error, but these 3 lines is necessary to send an e-mail, do you have the right path for the include and have you run the -- $oOutlook = _OutlookOpen() -- this is necessary for having an object the other functions can refer to ?

#Include "V:\Source Code\Outlook\Outlook.au3"
$oOutlook = _OutlookOpen()

_OutlookSendMail($oOutlook, "name@domain.com","","", "Header", "The Body Rich Text","c:\temp\xx.txt;c:\temp\aa.txt;c:\temp\bb.txt;c:\temp\cc.txt",$olFormatRichText,"","V:\Source code\Outlook\OutlookWarning1.exe")


Thanks for your time Wooltown...
I have resolved that issue...

Regards

#19 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 02 March 2009 - 08:17 AM

New function:
_OutlookDeleteMail - 2009-03-02 - Delete one or more mail from a folder in Outlook

#20 User is offline   Wooltown 

  • Alpha Geek
  • PipPipPipPip
  • Group: Full Members
  • Posts: 464
  • Joined: 02-June 05
  • Gender:Male
  • Location:Sweden, Lund

Posted 04 March 2009 - 08:42 AM

New functions added:
_OutlookGetTasks - New 2009-03-04 - Get an array of all Tasks
_OutlookGetNotes - New 2009-03-04 - Get an array of all Notes
_OutlookGetContacts - New 2009-03-04 - Get an array of all Contacts

  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
1 members, 1 guests, 0 anonymous users

  1. Gabriel12345