To create a new instance of a custom form programmatically, use the Add method on the target folder's Items collection. If it's a message form, you can use the Drafts folder as the target. 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.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"SFAxess" <(E-Mail Removed)> wrote in message news:7AA46F77-1A69-4070-9159-(E-Mail Removed)...
> Hello,
>
> I have been trying to find a way to open a published custom Outlook form
> outside of Outlook using VBA. The form has vbscript, so using an .oft via the
> CreateItemFromTemplate method will not work. I tried changing the message
> class of the newly created mail item, but that didn't seem to work.
>
> Any suggestions are most welcome.
>
> Thanks!
>