Using User Creating Forms

  • Thread starter Thread starter David C. Holley
  • Start date Start date
D

David C. Holley

I'm in the process of creating a VBA sub to create Outlook appointment
items from within Access. I have a specific Outlook form that I want to
use to display these appointments. What do I need to do in order to have
this specific form used when displaying these appointments?

David H
 
To create a new instance of a custom form programmatically, use the Add
method on the target folder's Items collection. If the target is a default
folder, you can use the Namespace.GetDefaultFolder method to return it as a
MAPIFolder object. Otherwise, you can use the code at
http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy
and return the MAPIFolder corresponding to a given path string.
 
Need to restate the question.

If there are multiple forms that can display an appointment item, is it
possible to designate which specific form should be used to display the
item?
 
You would have to set the MessageClass proeprty on the item to the desired
form class, save the item, dereference its object variable, then open it.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Well that helps, by *&@^%(@*& Microsoft doesn't provide any information
in Help about determining the Class of the custom form. I've got the
form associated with the CALENDAR folder and in code I'm using

..MessageClass = "ITM.Appointment.Reservations"

Does it make a difference that I'm creating the item via Access code and
manually trying to open in Outlook?

The error message returned is 'THE CUSTOM FORM COULD NOT BE FOUND.
OUTLOOK WILL USE....'

David H
 
You have a type in the form name. A valid message class name would be
"IPM.Appointment.Reservations"

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Yeah, well I just FRIGGING figured that out when working on some other
code. This developer that I'm working with, who looks remarkably like
me, is just a utter idiot.

David H
 
Back
Top