A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Making a code...



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 12th 07, 04:32 PM posted to microsoft.public.outlook.program_forms
steve
external usenet poster
 
Posts: 317
Default 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!
  #2  
Old July 12th 07, 04:49 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default 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!

  #3  
Old July 12th 07, 05:10 PM posted to microsoft.public.outlook.program_forms
steve
external usenet poster
 
Posts: 317
Default 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!


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a second calendar syssupspe Outlook - Calandaring 7 April 15th 07 11:37 PM
Look at others schedule when making meeting Amy Berning Outlook - Calandaring 1 July 29th 06 08:21 AM
making not able to forward...? George Outlook - General Queries 6 February 13th 06 09:58 PM
Making an apt into a public calendar SAC Outlook and VBA 1 February 9th 06 05:42 PM
code : Code : 800cccd2 scotty971fr Outlook Express 1 January 20th 06 12:59 AM


All times are GMT +1. The time now is 11:17 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.