PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Exporting information from an Appointment in Outlook

Reply

Exporting information from an Appointment in Outlook

 
Thread Tools Rate Thread
Old 11-11-2004, 10:28 PM   #1
=?Utf-8?B?U2Ft?=
Guest
 
Posts: n/a
Default Exporting information from an Appointment in Outlook


I have a small pice of code that generates an email messages to a user when
ever someone enters an appointment in their calendar. Currently, the email
that is generated tells them a new appointment has been added to their
calendar. How can I export out information from the following fields:

Subject
Location
Start Time
End Time

to make the email sent out more meaningful? I would like to send out an
email that says something like this:

A new appointment has been added to your calendar.
Subject: HR Meeting
Location: Conference Room 1A
Start Time: 11/15/04 11:00 am
End TIme: 11/15/04 11:30 am

I know how to do this with a custom form, but can't figure out how to do it
for a standard form - not sure what labels to query. In a custom form, if I
had a field called DT, I would query its value and generate an email with
that value:

MyItem.Body = "Subject: " + chr(13) + userproperties("dt").value

Just not sure what to query in this case.

Thanks.

S
  Reply With Quote
Old 11-11-2004, 11:15 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: Exporting information from an Appointment in Outlook

You need to get the properties from the specific appointment -- same syntax
as MyItem.Body. If your code an event handler for MAPIFolder.Items.ItemAdd,
that appointment is the one passed as an Item argument for the event
handler.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Sam" <Sam@discussions.microsoft.com> wrote in message
news:CF12F148-838A-47EB-AF87-8321A3BF066C@microsoft.com...
>I have a small pice of code that generates an email messages to a user when
> ever someone enters an appointment in their calendar. Currently, the email
> that is generated tells them a new appointment has been added to their
> calendar. How can I export out information from the following fields:
>
> Subject
> Location
> Start Time
> End Time
>
> to make the email sent out more meaningful? I would like to send out an
> email that says something like this:
>
> A new appointment has been added to your calendar.
> Subject: HR Meeting
> Location: Conference Room 1A
> Start Time: 11/15/04 11:00 am
> End TIme: 11/15/04 11:30 am
>
> I know how to do this with a custom form, but can't figure out how to do
> it
> for a standard form - not sure what labels to query. In a custom form, if
> I
> had a field called DT, I would query its value and generate an email with
> that value:
>
> MyItem.Body = "Subject: " + chr(13) + userproperties("dt").value
>
> Just not sure what to query in this case.
>
> Thanks.
>
> S



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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