A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Automatically convert mail to Calendar item



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 23rd 06, 09:27 AM posted to microsoft.public.outlook.program_vba
Daze Ahead
external usenet poster
 
Posts: 4
Default Automatically convert mail to Calendar item

I want to push an entry into my Calendar, based on key words in an email.
The mail has standard subject and text body (generated by another system).
e.g. Mail contains..
Component : MSwidget
Release number : 6.0.18
Release type : Maintenance Release
Release status : Planned
Release date : 2006-02-16 12:00:00

How to extract "Release date" and generate a Calendar entry for this day?
The rules Wizard is limited to mail directories. //DJ

Ads
  #2  
Old January 25th 06, 06:00 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Automatically convert mail to Calendar item

This can be done, but could prove tricky unless the text in the message body
never wavers from it's format. You may need to play around with my string
logic, but this should be a good start for you. It's setup to be run from a
rule:

How to create a script for the Rules Wizard in Outlook:
http://support.microsoft.com/default...;en-us;q306108

Sub CreateAppointmentFromMessageBody(Item As Outlook.MailItem)

Dim objAppt As Outlook.AppointmentItem
Dim strX() As String, intX As Integer, intY As Integer
Dim strY() As String
Dim dteRelease As Date

strX = Split(Item.Body, Chr(13))
For intX = 0 To UBound(strX)
strY = Split(strX(intX), ":", 2)
For intY = 0 To UBound(strY)
If InStr(strY(intY), "Release date") 0 Then
dteRelease = strY(intY + 1)
GoTo Continue:
End If
Next
Next

Continue:
Set objAppt = Application.CreateItem(olAppointmentItem)
objAppt.Start = dteRelease
objAppt.Display
Set objAppt = Nothing
End Sub

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Daze Ahead" wrote:

I want to push an entry into my Calendar, based on key words in an email.
The mail has standard subject and text body (generated by another system).
e.g. Mail contains..
Component : MSwidget
Release number : 6.0.18
Release type : Maintenance Release
Release status : Planned
Release date : 2006-02-16 12:00:00

How to extract "Release date" and generate a Calendar entry for this day?
The rules Wizard is limited to mail directories. //DJ

  #3  
Old January 26th 06, 03:21 PM posted to microsoft.public.outlook.program_vba
Daze Ahead
external usenet poster
 
Posts: 4
Default Automatically convert mail to Calendar item

Thanks for the pointers. The formats are fixed, that's the reason I embarked
on this one, that the strings are recognisable and standard.
I'll give it a go and publish the result, when it is successful. DJ

"Eric Legault [MVP - Outlook]" wrote:

This can be done, but could prove tricky unless the text in the message body
never wavers from it's format. You may need to play around with my string
logic, but this should be a good start for you. It's setup to be run from a
rule:

How to create a script for the Rules Wizard in Outlook:
http://support.microsoft.com/default...;en-us;q306108

Sub CreateAppointmentFromMessageBody(Item As Outlook.MailItem)

Dim objAppt As Outlook.AppointmentItem
Dim strX() As String, intX As Integer, intY As Integer
Dim strY() As String
Dim dteRelease As Date

strX = Split(Item.Body, Chr(13))
For intX = 0 To UBound(strX)
strY = Split(strX(intX), ":", 2)
For intY = 0 To UBound(strY)
If InStr(strY(intY), "Release date") 0 Then
dteRelease = strY(intY + 1)
GoTo Continue:
End If
Next
Next

Continue:
Set objAppt = Application.CreateItem(olAppointmentItem)
objAppt.Start = dteRelease
objAppt.Display
Set objAppt = Nothing
End Sub

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Daze Ahead" wrote:

I want to push an entry into my Calendar, based on key words in an email.
The mail has standard subject and text body (generated by another system).
e.g. Mail contains..
Component : MSwidget
Release number : 6.0.18
Release type : Maintenance Release
Release status : Planned
Release date : 2006-02-16 12:00:00

How to extract "Release date" and generate a Calendar entry for this day?
The rules Wizard is limited to mail directories. //DJ

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I convert Outlook calendar into a Word document? Jeana Outlook - Calandaring 2 March 7th 06 05:03 PM
How do I convert my calendar to a new computer TTracks Outlook - Calandaring 1 March 4th 06 09:38 AM
How can I open a mail item from outside Outlook 2003? Massimo Outlook - General Queries 2 February 4th 06 04:17 PM
Automatically convert email to calendar entry Daze Ahead Outlook - Calandaring 5 January 26th 06 06:40 AM
calendar item Sue Mosher [MVP-Outlook] Outlook - Calandaring 5 January 24th 06 08:17 PM


All times are GMT +1. The time now is 09:32 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright 2004-2014 Outlook Banter.
The comments are property of their posters.