sending a mailitem with a userdefined form by a visualbasic-programm

  • Thread starter Thread starter Christian
  • Start date Start date
C

Christian

I would like to send a form with the mailitem by a small vb-programm like
this:

....
myItem.To = "myusername"
myItem.Subject = "blablalba"
myItem.Body = "TextText"
myItem.MessageClass = "IPM.Note.MyNewForm"
myItem.Send
....

In design mode of my form I have set the option "Send form definition with
item" to true.
If I send the form to my own computer it works fine but it didn´t work at
another PC (by sending with my visual basic progy). If I send it with
Outlook directly by choosing the form it works allways!? Is there something
more todo in my progy? I only set the MessageClass value of my item.

Maybe someone can help me

Thanks for your help.
Christian
 
Try using the MAPIFolder.Items.Add method to create the message in your Drafts folder directly, including the message class as the argument. (See http://www.slipstick.com/dev/launchform.htm)

Also, depending on your Outlook version and configuration, the rich-text content -- i.e. the form definition -- may be lost in the transmission. See http://www.slipstick.com/dev/sendform.htm for more information on this problem.

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top