p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   BOOK: Professional Outlook 2007 Programming ISBN: 978-0-470-04994-5 (http://p2p.wrox.com/book-professional-outlook-2007-programming-isbn-978-0-470-04994-5-363/)
-   -   Opening a saved Outlook customized form (http://p2p.wrox.com/book-professional-outlook-2007-programming-isbn-978-0-470-04994-5/63808-opening-saved-outlook-customized-form.html)

Arsi November 15th, 2007 04:07 PM

Opening a saved Outlook customized form
 
Hi again,

After putting in all the code I needed, I published my form. The way our organization works with forms, is that the form is emailed as an attachment to a user. The user would typically double-click on the icon to open the form and fill it out. My form does not allow the user to double-click on the icon to open it. When the user double-clicks on the file, and clicks open, the following message is displayed:

"Outlook has blocked access to this form template file. If you know and trust the person who created the form, on the File menu, point to New, click Choose Form, and then in the Look In list, click User Templates in File System".

At the dialog box, if the user clicks "Ok", a blank email message opens with the proper subject line and Send To: email address pertaining to the form.

What do I need to do to make the "double-clicking" of the icon for the form work for the user?

Also, I've tried saving the emailed file to a local drive then selecting it from Tools-->Choose Form, but it doesn't look like the code for the form executes when that's done.

What can I do?

Thanks!

Arsi

*******(*)*******

Ken Slovak November 15th, 2007 04:46 PM

Starting with Outlook 2003 SP3 I believe it was and continuing with Outlook 2007 no code will run from an unpublished form. No code also runs from one-offed forms. You also can no longer just double-click to open an OFT file and expect the code to run either.

There's no way around that. Each user must have the form published in their Personal Forms Library or the form must be published in the Organizational Forms Library if your organization has one of those on the Exchange server.

To open an OFT file (that's the format that has to be used) you must select Tools, Forms, Design a Form, select User Templates in the File System, open the OFT file and publish it. Or something like a COM addin or script can publish the form using code instead of having the user do that. That's what I usually do, write code in a COM addin to publish any required OFT files.

Outlookcode.com has a good write-up of the security on unpublished forms and how to publish a form from either the UI or by using code.


Ken Slovak

Arsi November 15th, 2007 04:56 PM

Hi Ken,

Thank you very much!

Arsi

*******(*)*******

bpl January 11th, 2012 03:47 PM

Opening a saved Outlook customized form after moving to another folder
 
I have similar problem. After putting in my customized form all code I needed, I published my form. The way our organization works with form, is that the published form opened in the same folder as published, user fill out all items and then form approved by his manager and saved in the same folder. In Item_Open event I included code to make checkbox "Manager Approved" disabled after manager checked checkbox and saved the form. This works fine and after director of department open the form again, checkbox "Manager Approved" is disabled.
Now director has to approve the form too, check checkbox "Director Approved", save form again and in this case approved by director form moved to another folder for IT processing using function Item.Move in Item_Write function. I also included in Item_Open event code to make checkbox "Director Approved" disabled after director checked checkbox and saved the form. But when form is opened in another folder after saving and moving, checkbox "Director Approved" still enabled and I found that vbscript in Item_Open event don't run after form is opened in another folder.
Is this mean that form became "one-off" after moving to another folder? Is there any way to make code run in Item_Open event to make checkbox disabled?


All times are GMT -4. The time now is 08:26 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.