![]() |
Making a code...
Outlook 2003...building a custom form.
I need to make a command button open a new form. The command button is "CommandButton26" -- I am very new at programming and was wondering if anyone would help me out on a code to make this button open a new form. The forms I am working with are contact forms... I would appreciate any assistance! thanks! |
Making a code...
To create a new instance of a custom form programmatically, use the Add method on the target folder's Items collection:
Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName") If it's a message form, 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. To create an item in another person's mailbox, use Namespace.GetSharedDefaultFolder to get the MAPIFolder 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 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Steve" wrote in message ... Outlook 2003...building a custom form. I need to make a command button open a new form. The command button is "CommandButton26" -- I am very new at programming and was wondering if anyone would help me out on a code to make this button open a new form. The forms I am working with are contact forms... I would appreciate any assistance! thanks! |
Making a code...
Thank you -- Great book by the way, I use it nearly everyday!
thanks again Sue. "Sue Mosher [MVP-Outlook]" wrote: To create a new instance of a custom form programmatically, use the Add method on the target folder's Items collection: Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName") If it's a message form, 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. To create an item in another person's mailbox, use Namespace.GetSharedDefaultFolder to get the MAPIFolder 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 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Steve" wrote in message ... Outlook 2003...building a custom form. I need to make a command button open a new form. The command button is "CommandButton26" -- I am very new at programming and was wondering if anyone would help me out on a code to make this button open a new form. The forms I am working with are contact forms... I would appreciate any assistance! thanks! |
All times are GMT +1. The time now is 08:31 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com