The Outlook forms alternative
Sometimes creating Outlook forms is a good alternative to developing Outlook add-ons. They can run scripts written in VBScript, an old fashioned language, but powerful enough. Another benefit of creating Outlook forms is that they do not need to be installed as extra software. Outlook forms can be deployed and shared on a Microsoft Exchange Server or as a file.
One problem that arises when you use Outlook forms as a template for e-mails is that if they contain scripting, the script is attached to the e-mail as a winmail.dat file. When the recipient opens the e-mail he will see the message “The item contain active content that cannot be displayed in the Reading Pane. Open the item to read its contents.”. This is annoying since users may suspect active content of being malicious and they can’t preview it.
This is a quick step by step example to create a new Outlook form to use as an e-mail template and remove the script in the send event. We set the UseTNEF MAPI property to false to achieve this result.
Creating the Outlook Form Template
- Enable the developer options
- Click “New/Choose Form”
- Select “Message” from the “Standard Forms Library”
- Write the content of your e-mail template
- Go to the developer option or ribbon under Outlook 2007/2010 and click on “Design This Form”
- Click on “View Code”
- Click on “Script/Event Handler…” option
- Select the “Send” event
- Add the following code to remove the script
Function Item_Send() MsgBox "Item being sent without a winmail.dat file attached" Item.PropertyAccessor.SetProperty "http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B", False End Function
- Close the script editor
- Click on “Publish/Publish Form As” and choose a name to be stored in the “Personal Forms Library”
- It is saved now
Using the Outlook Form Template
- Click “New/Choose From”
- Go to the “Personal Forms Library” and select your created form
- Complete the e-mail
- Press “Send”
Voilà! The e-mail is sent without active content.
Related Services
Please, support our blog reading Windows driver development, Outlook 365 Plugin Development, Reverse Engineering Services and Data Loss Prevention Solution Development.
I love it! Excellent article. You touched on a topical issue. I would appreciate if you’d written about how to fill a form online. I’ve forgotten the last time I filled out a form on paper. I mostly use PDFfiller to edit. You can easily fill NYC DCA Home Improvement Contract here
http://goo.gl/zZbjPg
>