Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Calendaring / June 2007

Tip: Looking for answers? Try searching our database.

Email Message instead of a Meeting Request

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marzipan - 20 Jun 2007 15:33 GMT
We have a training room calendar.  I'd like the new appointment event to
trigger a regular email message from a template not a meeting request.  Ideas?

Outlook 2003 / Exchange 2003
Sue Mosher [MVP-Outlook] - 20 Jun 2007 15:59 GMT
Put code in the appointment form's Item_Write event to generate the mail message, starting with Application.CreateItem().

FYI, there is a newsgroup specifically for Outlook forms issues "down the hall" at microsoft.public.outlook.program_forms or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public
.outlook.program_forms


Signature

Sue Mosher, Outlook MVP
  Author of Microsoft Outlook 2007 Programming:
    Jumpstart for Power Users and Administrators
   http://www.outlookcode.com/article.aspx?id=54

> We have a training room calendar.  I'd like the new appointment event to
> trigger a regular email message from a template not a meeting request.  Ideas?
>
> Outlook 2003 / Exchange 2003
Marzipan - 20 Jun 2007 18:16 GMT
I'm assuming you do this by selecting the "view code" button and then adding
the VBscript needed.  I'm new to customizing forms (not scripting).

> Put code in the appointment form's Item_Write event to generate the mail message, starting with Application.CreateItem().
>
[quoted text clipped - 4 lines]
> >
> > Outlook 2003 / Exchange 2003
Sue Mosher [MVP-Outlook] - 20 Jun 2007 18:32 GMT
Exactly. The Script | Event Handler command will insert the shell for all Item-level events.

Signature

Sue Mosher, Outlook MVP
  Author of Microsoft Outlook 2007 Programming:
    Jumpstart for Power Users and Administrators
   http://www.outlookcode.com/article.aspx?id=54

> I'm assuming you do this by selecting the "view code" button and then adding
> the VBscript needed.  I'm new to customizing forms (not scripting).
>
>> Put code in the appointment form's Item_Write event to generate the mail message, starting with Application.CreateItem().
>>
>> FYI, there is a newsgroup specifically for Outlook forms issues "down the hall" at microsoft.public.outlook.program_forms or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public
.outlook.program_forms

>> > We have a training room calendar.  I'd like the new appointment event to
>> > trigger a regular email message from a template not a meeting request.  Ideas?
>> >
>> > Outlook 2003 / Exchange 2003
Marzipan - 20 Jun 2007 19:46 GMT
I am trying to reference the values from the appointment in the message as
follows:

Function Item_Write()
    Set myOlApp = CreateObject("Outlook.Application")
    Set MyItem = myOlApp.CreateItem(olMailItem)
    MyItem.Subject = item.subject
    MyItem.Body = item.location + " " + item.start
    MyItem.Display
End Function

I am getting an error on item.location; note our room descriptions have the
following charaters "* #" ; is this a problem?

Also, I'd like to copy the description (body) of the appointment into the
body of the message, however, I don't see a body item referenced.

Is there a better way?
Sue Mosher [MVP-Outlook] - 20 Jun 2007 21:14 GMT
You don't need a statement like this:

   Set myOlApp = CreateObject("Outlook.Application")

Instead of myOlApp, use the intrinsic Application object. Likewise, there is an intrinsic Item object, representing the current item. (THat's why the event handler is Item_Write. Item is the object firing the event.) Therefore, Item.Subject, etc. is absolutely correct! Other property names you can look up in the object browser. Body is indeed the name of the item body property.

What kind of error?

Note that VBScript does not support constants other than vb* constants. For Outlook ol* constants, you need to declare them or use their literal values. olMailItem works only because its literal value is 0.

Signature

Sue Mosher, Outlook MVP
  Author of Microsoft Outlook 2007 Programming:
    Jumpstart for Power Users and Administrators
   http://www.outlookcode.com/article.aspx?id=54

>I am trying to reference the values from the appointment in the message as
> follows:
[quoted text clipped - 14 lines]
>
> Is there a better way?
Marzipan - 20 Jun 2007 18:41 GMT
Never Mind.  Found info on Outlookcode.com  Thanks, Sue.

> I'm assuming you do this by selecting the "view code" button and then adding
> the VBscript needed.  I'm new to customizing forms (not scripting).
[quoted text clipped - 7 lines]
> > >
> > > Outlook 2003 / Exchange 2003

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.