CreateItemFromTemplate

  • Thread starter Thread starter Jon Rizzo
  • Start date Start date
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
 
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.
 
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
 
Back
Top