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

create appointment from email



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 14th 07, 09:43 PM posted to microsoft.public.outlook.program_vba
julkes
external usenet poster
 
Posts: 3
Default create appointment from email

Please can someone help me with this. I am trying to create a calendar
appointment from an email using rules. Does anyone have an example piece of
code that does this or is close to this please.
  #2  
Old February 14th 07, 11:32 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default create appointment from email

Can you be more specific with what this appointment should contain? Do you
want to use the "Run a Script" action with your rule to run your VBA code?

FYI, to create an appointment:

Set myItem = myOlApp.CreateItem(olAppointmentItem)

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


"julkes" wrote:

Please can someone help me with this. I am trying to create a calendar
appointment from an email using rules. Does anyone have an example piece of
code that does this or is close to this please.

  #3  
Old February 15th 07, 06:31 PM posted to microsoft.public.outlook.program_vba
julkes
external usenet poster
 
Posts: 3
Default create appointment from email

sorry that was a weak question. Let me start again.

I have email messages which arrive in my inbox which I want to create a rule
to run an external application vbs script which will find the start and end
date and time contained in the message and create an appointment on my
calendar.

START: dd-mmm-yyyy hh:mm
END: dd-mmm-yyyy hh:mm

with the same subject details as contained by the message. I then need to
copy the content of the message into the notes for the appointment.

To be honest I thought this would have been done by someone before and all I
needed to do was copy the code to use it.

Regards,

Mark.

"Eric Legault [MVP - Outlook]" wrote:

Can you be more specific with what this appointment should contain? Do you
want to use the "Run a Script" action with your rule to run your VBA code?

FYI, to create an appointment:

Set myItem = myOlApp.CreateItem(olAppointmentItem)

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


"julkes" wrote:

Please can someone help me with this. I am trying to create a calendar
appointment from an email using rules. Does anyone have an example piece of
code that does this or is close to this please.

  #4  
Old February 15th 07, 08:18 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default create appointment from email

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

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


"julkes" wrote:

sorry that was a weak question. Let me start again.

I have email messages which arrive in my inbox which I want to create a rule
to run an external application vbs script which will find the start and end
date and time contained in the message and create an appointment on my
calendar.

START: dd-mmm-yyyy hh:mm
END: dd-mmm-yyyy hh:mm

with the same subject details as contained by the message. I then need to
copy the content of the message into the notes for the appointment.

To be honest I thought this would have been done by someone before and all I
needed to do was copy the code to use it.

Regards,

Mark.

"Eric Legault [MVP - Outlook]" wrote:

Can you be more specific with what this appointment should contain? Do you
want to use the "Run a Script" action with your rule to run your VBA code?

FYI, to create an appointment:

Set myItem = myOlApp.CreateItem(olAppointmentItem)

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


"julkes" wrote:

Please can someone help me with this. I am trying to create a calendar
appointment from an email using rules. Does anyone have an example piece of
code that does this or is close to this please.

  #5  
Old February 15th 07, 09:10 PM posted to microsoft.public.outlook.program_vba
julkes
external usenet poster
 
Posts: 3
Default create appointment from email

Thanks eric,

That gives me the structure for the appointment. Can you give me a clue to
how to extract the subject from the message that just came in, and what
commands to find and say extract say the START: date and time from the
message. Sorry to ask this but I think you guessed im not a programmer!

Regards,

Mark.

"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

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


"julkes" wrote:

sorry that was a weak question. Let me start again.

I have email messages which arrive in my inbox which I want to create a rule
to run an external application vbs script which will find the start and end
date and time contained in the message and create an appointment on my
calendar.

START: dd-mmm-yyyy hh:mm
END: dd-mmm-yyyy hh:mm

with the same subject details as contained by the message. I then need to
copy the content of the message into the notes for the appointment.

To be honest I thought this would have been done by someone before and all I
needed to do was copy the code to use it.

Regards,

Mark.

"Eric Legault [MVP - Outlook]" wrote:

Can you be more specific with what this appointment should contain? Do you
want to use the "Run a Script" action with your rule to run your VBA code?

FYI, to create an appointment:

Set myItem = myOlApp.CreateItem(olAppointmentItem)

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


"julkes" wrote:

Please can someone help me with this. I am trying to create a calendar
appointment from an email using rules. Does anyone have an example piece of
code that does this or is close to this please.

  #6  
Old February 15th 07, 10:02 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default create appointment from email

You'll have to use some of the functions from the intrinsic Strings class in
VBA. Functions like InStr, Left, Right, Mid, etc. These all allow you to
parse text; not easily mind you - it'll involve a fair bit of logic.

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


"julkes" wrote:

Thanks eric,

That gives me the structure for the appointment. Can you give me a clue to
how to extract the subject from the message that just came in, and what
commands to find and say extract say the START: date and time from the
message. Sorry to ask this but I think you guessed im not a programmer!

Regards,

Mark.

"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

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


"julkes" wrote:

sorry that was a weak question. Let me start again.

I have email messages which arrive in my inbox which I want to create a rule
to run an external application vbs script which will find the start and end
date and time contained in the message and create an appointment on my
calendar.

START: dd-mmm-yyyy hh:mm
END: dd-mmm-yyyy hh:mm

with the same subject details as contained by the message. I then need to
copy the content of the message into the notes for the appointment.

To be honest I thought this would have been done by someone before and all I
needed to do was copy the code to use it.

Regards,

Mark.

"Eric Legault [MVP - Outlook]" wrote:

Can you be more specific with what this appointment should contain? Do you
want to use the "Run a Script" action with your rule to run your VBA code?

FYI, to create an appointment:

Set myItem = myOlApp.CreateItem(olAppointmentItem)

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


"julkes" wrote:

Please can someone help me with this. I am trying to create a calendar
appointment from an email using rules. Does anyone have an example piece of
code that does this or is close to this please.

  #7  
Old March 1st 07, 12:06 AM posted to microsoft.public.outlook.program_vba
grep
external usenet poster
 
Posts: 6
Default create appointment from email

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

  #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


 




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 create an appointment for someone else? Mike Outlook - Calandaring 2 October 28th 08 10:34 PM
Can't create new appointment John Outlook - Calandaring 2 February 5th 07 11:56 PM
Error when I try to create a new appointment Outlook 2003 email problems Outlook - Calandaring 2 November 18th 06 01:53 AM
Refuse to create new appointment Theo Outlook - Calandaring 1 October 16th 06 02:27 PM
Create an appointment with a contact. [email protected] Outlook - Using Forms 1 February 24th 06 02:35 PM


All times are GMT +1. The time now is 07:10 AM.


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