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

Add button to Outlook Toolbar to launch specific form



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 19th 08, 06:48 PM posted to microsoft.public.outlook.program_forms
Jim[_8_]
external usenet poster
 
Posts: 2
Default Add button to Outlook Toolbar to launch specific form

Hello, I have a mailbox with some custom forms and I'd like to add a button
to the toolbar that would launch a specific form.

Can someone point me in the right direction as to how to accomplish this?

I've added a button to launch the select forms window but they still have to
change folders and select the correct form. I'm looking to automate this
with just a button click.

Thanks
Jim

Ads
  #2  
Old March 19th 08, 07:46 PM posted to microsoft.public.outlook.program_forms
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Add button to Outlook Toolbar to launch specific form

You can get a reference to the folder in code without selecting it, then
instantiate a specific form and display it using something like:

Dim objMail As Outlook.MailItem
Dim objInbox As Outlook.MAPIFolder
Dim objNS As Outlook.NameSpace

Set objNS = Application.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Set objMail = objInbox.Items.Add("IPM.Note.MyCustomFormName")
objMail.Display

Set objMail = Nothing
Set objInbox = Nothing
Set objNS = Nothing

You can access other folders by working through Folders collections in each
folder. i.e.
objMail.Folders("InboxSubFolder").Folders("InboxSu bFolderSubFolder")

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Jim" wrote:

Hello, I have a mailbox with some custom forms and I'd like to add a button
to the toolbar that would launch a specific form.

Can someone point me in the right direction as to how to accomplish this?

I've added a button to launch the select forms window but they still have to
change folders and select the correct form. I'm looking to automate this
with just a button click.

Thanks
Jim


 




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
Outlook 2007 - Junk Email Toolbar Button Jim Brown Outlook - General Queries 2 March 8th 08 10:22 PM
Advice on creating button to launch custom form Eric J Outlook - Using Forms 4 June 26th 07 06:41 PM
how do i put the send button into outlook 2003 email toolbar? igorathepsychowoman Outlook - Installation 1 August 27th 06 08:47 AM
Calling a private sub in Outlook via toolbar button butterfly Outlook and VBA 1 June 27th 06 06:21 AM
Create button on toolbar for form BTH Outlook - Using Forms 1 May 11th 06 01:22 PM


All times are GMT +1. The time now is 09:01 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.