Message-Form won't run from toolbar

T

Thomas Noone

Hi,

I've created a form based on the new message form (ipm.note) with additional
buttons and code. Code works fine.

I need to create an icon on the toolbar, that will open this form as an
alternative to the standard new message form.
This I do by adding a new icon and linking it with my forms oft-file.

With Outlook 2003 the following happens:
The code will not run, when this form is opened via icon using this link.
It will run, if I select the published form from the Outlook menu or go into
designer mode.

What must I do, to get a new message form linked with an icon on the tool
bar, so that it will execute its code?
Is it possible?

Knowledge base articles have not been of any help and I have not been able
to link an icon with a published form.

Any help is greatly appreciated.

Thomas
 
S

Sue Mosher [MVP-Outlook]

Code won't run on unpublished forms such as .oft files. To create a new
instance of a published 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.

See http://www.outlookcode.com/d/launchform.htm for other ideas.
 

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