PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Form Programming How to programatically launch new custom form?

Reply

How to programatically launch new custom form?

 
Thread Tools Rate Thread
Old 28-04-2004, 05:25 PM   #1
Rob S
Guest
 
Posts: n/a
Default How to programatically launch new custom form?


Hi,

I have a custom form published in my Personal Forms Library. I want to add a
button/menu item that allows me to launch it directly, effectively replacing
the Choose Form operation.

I'm trying to do this via an addin - VC or VB, I don't mind which (but not
using macros, form script, etc.). I can see how I can launch standard forms,
but I can't find a way of directly launching a custom form.

Does anyone know how (or if) I can do this?

Thanks,
Rob


  Reply With Quote
Old 28-04-2004, 05:41 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: How to programatically launch new custom form?

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.

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

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Rob S" <rspilsbury@boldonjames.com.nospam> wrote in message
news:%23iNe41TLEHA.2576@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have a custom form published in my Personal Forms Library. I want to add

a
> button/menu item that allows me to launch it directly, effectively

replacing
> the Choose Form operation.
>
> I'm trying to do this via an addin - VC or VB, I don't mind which (but not
> using macros, form script, etc.). I can see how I can launch standard

forms,
> but I can't find a way of directly launching a custom form.
>
> Does anyone know how (or if) I can do this?
>
> Thanks,
> Rob
>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off