Email Message instead of a Meeting Request

G

Guest

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
 
G

Guest

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).
 
G

Guest

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?
 
S

Sue Mosher [MVP-Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top