CreateItemFromTemplate with VBS

  • Thread starter Thread starter PeterQ
  • Start date Start date
P

PeterQ

Hello Team,

I have created in OL2003 a mailitem using CreateITemFromTemplate. The
form created has VBScript code in it, only it is not executed after
creation and displaying it to the user.
Does anyone know what to do to get the code running please ?

Greetings,
Peter
 
Code runs only on published forms. CreateItemFromTemplate invokes an .oft
file, which is not a published form.

You need to publish the form. Then, to create a new instance of the 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.
 
Back
Top