View Single Post
  #8  
Old March 1st 07, 10:49 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default create appointment from email

You have to do the same thing the KB article describes. You still need to
write your own logic to parse the message data though.

--
Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"grep" wrote:

Hey Eric,

I actually want to do something a little different, but similar in some
ways. I want to use a rule to automatically parse out data in an
incoming email, and stuff the values into an Access table. Any
suggestions as to where I would look to do that?

grep

Eric Legault [MVP - Outlook] wrote:
This isn't terribly hard to do if you take a look at the Outlook VBA Help
file. First off, you can fire a macro with a rule:

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

You don't need to have your code in a vbs file - write it as Outlook VBA
code. The sample from help below should get you started. You can pass the
Item.Body property derived from the Item object passed in the
CustomMailMessageRule procedure to the AppointmentItem.Body property. You
just need to write some custom logic to parse Item.Body to find the meeting
details.

Sub ScheduleMeeting()
Dim myOlApp As Outlook.Application
Dim myItem as Outlook.AppointmentItem
Dim myRequiredAttendee As Outlook.Recipient
Dim myOptionalAttendee As Outlook.Recipient
Dim myResourceAttendee As Outlook.Recipient
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olAppointmentItem)
myItem.MeetingStatus = olMeeting
myItem.Subject = "Strategy Meeting"
myItem.Location = "Conference Room B"
myItem.Start = #9/24/2003 1:30:00 PM#
myItem.Duration = 90
Set myRequiredAttendee = myItem.Recipients.Add ("Nate Sun")
myRequiredAttendee.Type = olRequired
Set myOptionalAttendee = myItem.Recipients.Add ("Kevin Kennedy")
myOptionalAttendee.Type = olOptional
Set myResourceAttendee = myItem.Recipients.Add("Conference Room B")
myResourceAttendee.Type = olResource
myItem.Send
End Sub


Ads