CreateItemFromTemplate

J

Jon Rizzo

Hello,

I would like to create a new item using a template that is stored in the
Organizational Forms Library (not in the user's file system). How do I
specify this as the path for the CreateItemFromTemplate method of the
Outlook.Application object?

Thanks for your assistance,

Jon
 
S

Sue Mosher [MVP-Outlook]

No path needed. Simply the wrong method. 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.
 
J

Jon Rizzo

Ahhhh. Thank you very much, Sue.

Jon


Sue Mosher said:
No path needed. Simply the wrong method. 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
 

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