Distribute Microsoft Outlook custom forms

S

Saurabh

I am developing a custom outlook form for meeting request. I am facing
problems in deploying this form on user's machines. I want to work in the
environment where there is no exchange server and still be able to publish
this form and make it a default form for meeting request. I am having a tuff
time with this.
I got this VB Script which is supposed to publish this form on user's
machine and then using FormAdmin tool I have created a .reg file which will
make this as the default form for meeting request. But the problem is that
the VB script that I have done't work as per my expectation. Here is the
script

Set objOL = CreateObject("Outlook.Application")
Set objItem =
objOL.createItemFromTemplate("C:\Temp\COutlook\CAppointment.oft")
Set objFD = objItem.FormDescription
objFD.DisplayName = "IPM.Appointment.CAppointment"
objFD.PublishForm = olPersonalRegistry

I am expecting that when I run this script my CData form will be published
to user's personal forms registry but this gives me an error saying "Property
is readonly". I got this code from
http://www.outlookcode.com/article.aspx?id=27

I am running this script as part of my installer which extracts the content
to a temp folder and then runs this script from the extracted content and
then after that runs the .reg file. I am not sure if I am follwoing the
right flow here? Because one thing which I never understood is from where
value of variable olPersonalRegistry will be initialised, because when I
tried to print the value I got nothing.

Any help will be very much appriciated on this.
 
K

Ken Slovak - [MVP - Outlook]

VBScript doesn't know from any of the Outlook enumerations such as
olPersonalRegistry. Also, PublishForm is a Sub (method) and not a property.

Put this in your code:

Const olPersonalRegistry = 2

Set objOL = CreateObject("Outlook.Application")
Set objItem = _
objOL.createItemFromTemplate("C:\Temp\COutlook\CAppointment.oft")

Set objFD = objItem.FormDescription
objFD.DisplayName = "IPM.Appointment.CAppointment"
objFD.PublishForm olPersonalRegistry
 
S

Saurabh

Hi Ken,
thanks for the reply. Your script runs like a charm for me. I was missing
that value assignment for Const olPersonalRegistry = 2. Thanks a lot.

Now I am able to publish that form with that script, but now I am facing
problem in making that form as a default form. I am using FormsAdmin tool to
generate the reg file which will make that form as the default form.(The reg
file generated has version 9 in the registry path, I have changed it to 11,
as I am using and targeting Outlook 2003).

When I use FormsAdmin tool to generate a reg file to make a Custom
Appointment form then it works fine. But when I use this tool to generate a
reg file to make Custom Meeting Request form as the default form it is not
able to do that.

I was trying to figure out the reason, and found few descripancies.
When I say desing (modify)Appointments form then while publishing
Appointments form, the message class for this new form comes as
IPM.Appointment.XXX. This is perfectly fine and thats why probably I can
replace this as a default Appointment form. But when I try to modify
Meeting Request form, at the time of publishing this form also I get the
message class a IPM.Appointment.XXX. Here I was expecting it to be
IPM.Schedule.Meeting.Request.XXX, because the Message class of default
Meeting Request form is IPM.Schedule.Meeting.Request.

Is my assumption correct? Is this is the reason my form is not able to
become default meeting request form because its message class is
IPM.Appointment.XXX?
If so, what is the way to modify Meeting Request form and have correct class
name?

If all above is wrong, can you tell me how do I make my form as default form
for meeting request?

Thanks for the help.
 
K

Ken Slovak - [MVP - Outlook]

I'm afraid you're going to have to come up with some other idea.

You can't publish a custom meeting request form using that MessageClass, nor
can you replace the default meeting request form. That's generated on the
fly from an appointment form. Therefore you cannot make your design a new
default meeting form.
 

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