Form publishing program

J

Jeff Mowatt

I'm writing a program to publish a form and have run into 3 problems with
the code below.

I'm hoping this program will demand no input from the user.

First I find a folder and save in "myid"

oappoint=creatitemfromtemplate("c:\mytemplate")
oform=oappoint.formdescription
oform.name="myformname"
oform.publishform(3, onamespace.getfolderfromid(myid))

Now the problems:

1) My program aborts if I use publishform with values other than 3

2) I get enable/disable macro prompts when publishform appears to work
without an abort.

3) myformname can't be found anywhere when publishform appears to work.


Something missing maybe?

Jeff Mowatt
 
S

Sue Mosher [MVP]

1) If you use a value other than 3, omit the optional Folder parameter.

Better to get the MAPIFolder object as a separate statement, rather than as an expression in the argument.

2) Are you getting prompts during your publish routine (expected behavior) or when you run the form? If the latter, clear the Send Form Definition with Item box on the (Properties) page before saving the .oft file.

3) How are you looking for it? What is the state of the "use form only for responses" box before you publish?
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
J

Jeff Mowatt

Sue,

I've made some progress. The program hasn't aborted since I
re-installed Outlook so I guess some corruption was involved.

Perhaps I should state the ultimate objective. My customer will use
this form as the default method of creating appointments, it will
therefore at some point overwrite the standard appointment form.

For the time being I'm trying to publish it alongside the standard
form with a different name, so I was attempting to place it in the
Calendar folder.

I've discovered a couple of things. With this program I can make my
form visible in only the organizational and personal form libraries. I
can also see that the name I give the form in the publishing program
is ignored and I must save the form to a file template with the name I
want to use.

I'm looking for the folder by walking all subfolders until I encounter
the one named Calendar.

The prompts appear when I publish the form and the "use form only for
responses" box is clear.

Regards,

Jeff Mowatt
 

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