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

How can I create a outlook appointment item from data in a e-mail?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 15th 06, 07:23 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default How can I create a outlook appointment item from data in a e-mail?

In your VBA editor, display the Object Browser (F2), choose VBA from the top
dropdown box and select the Strings class from the left pane. There are a
variety of text functions you can use (especially InStr, Replace, Left, Mid,
etc.) that can help you find certain text in the message body.

Once you get the text you need, it's easy to create a new appointment item:

Dim olApp As Outlook.Application
Dim objAppt As Outlook.AppointmentItem

Set olApp = Outlook.Application
'Create appointment item
Set objAppt = olApp.CreateItem(olAppointmentItem)
objAppt.Body = "My body text"

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


"StoltHD" wrote:

I get confirmation for work via e-mail and want to automaticelly create an
appointment item from the mail.
How can I get vba to read only a bit of the text in the subjectfield to get
the right mail... the subjectfield always contain 3 words in the beginning
that are the same for all i.e. "Confirmation from Company" + an address
then I want to get the time and hour from a textstring in the body and also
the address from another textstring in the body i.e. different lines.

in addition I want all text exept for the 3 first lines of the mailbody to
occur as bodytext in the appointment...

somebody that can help?


Ads
 




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
Cannot Create New Data File Bill Byrnes Outlook - General Queries 0 June 14th 06 03:19 AM
Create shortcut for File-Open-Outlook Data larjo42 Outlook and VBA 0 May 23rd 06 03:34 PM
How do I add an item that isn't an appointment? smags Outlook - Calandaring 1 March 22nd 06 07:35 PM
Can't double click to create a new appointment in Outlook pts66 Outlook - Calandaring 1 March 2nd 06 07:43 PM
Create a new item jim Add-ins for Outlook 3 February 8th 06 03:16 PM


All times are GMT +1. The time now is 08:15 PM.


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.