![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I'd like to be able to add two shortcut buttons to the toolbar on a new mail message. Instead of clicking on Options Request a read receipt OR Options Save sent items...etc I'd like to be able to have a button right on the standard toolbar for each of these two options. It may only save a couple clicks but every click helps! Can I do this with VBA since there doesn't appear to be an option in the available shortcut buttons in "customize"? It would also be nice to customize where the sent message will be saved to rather than the default "sent items" folder. Thanks. |
Ads |
#2
|
|||
|
|||
![]()
The first two things are relatively simple. You need two macros:
Sub DoNotSaveReply() 'Clears the 'Save sent messages to' option in the Message Options dialog Dim objMessage As Object Set objMessage = Application.ActiveInspector objMessage.CurrentItem.DeleteAfterSubmit = True Set objMessage = Nothing End Sub Sub RequestReadReceipt() 'Clears the 'Save sent messages to' option in the Message Options dialog Dim objMessage As Object Set objMessage = Application.ActiveInspector objMessage.CurrentItem.ReadReceiptRequested = True Set objMessage = Nothing End Sub Having sent items saved to a specific folder is a little tricker. Public Sub SaveReplyToSpecificFolder() On Error Resume Next Dim objMessage As Outlook.MailItem Dim objFolder As Outlook.MAPIFolder, objNS As Outlook.NameSpace Dim SentItemsFolderID As String Dim SentItemsFolderStoreID As String SentItemsFolderID = "00000000796361434A311F408F1D9BA8D935F32802810 000" SentItemsFolderStoreID = "0000000038A1BB1005E5101AA1BB08002B2A56C2000070737 47072782E646C6C00000000000000004E495441F9BFB80100A A0037D96E000000433A5C446F63756D656E747320616E64205 3657474696E67735C657269636C5C4C6F63616C20536574746 96E67735C4170706C69636174696F6E20446174615C4D69637 26F736F66745C4F75746C6F6F6B5C657269636C6D61696C2E6 D7670732E6F72672D30303030303031302E70737400" If Application.ActiveInspector.CurrentItem.Class Outlook.OlObjectClass.olmail Then Exit Sub Set objNS = Application.GetNamespace("MAPI") Set objFolder = objNS.GetFolderFromID(SentItemsFolderID, SentItemsFolderStoreID) If objFolder Is Nothing Then MsgBox "Unable to set Sent Message folder." Exit Sub End If Set objMessage = Application.ActiveInspector.CurrentItem Set objMessage.SaveSentMessageFolder = objFolder Set objNS = Nothing Set objMessage = Nothing Set objFolder = Nothing End Sub You can use Outlook Spy (http://www.dimastry.com) to easily get the EntryID and FolderID values for a specific folder, or use code (navigate to the folder, use ActiveExplorer.CurrentFolder, etc.). Otherwise, navigate the NameSpace.Folders collection to retrieve a specific MAPIFolder object. To map custom toolbar buttons to a macro, choose Macros from the Categories list in the Commands tab of the toolbar customization dialog, and select the macro on the right. -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ " wrote: Hi, I'd like to be able to add two shortcut buttons to the toolbar on a new mail message. Instead of clicking on Options Request a read receipt OR Options Save sent items...etc I'd like to be able to have a button right on the standard toolbar for each of these two options. It may only save a couple clicks but every click helps! Can I do this with VBA since there doesn't appear to be an option in the available shortcut buttons in "customize"? It would also be nice to customize where the sent message will be saved to rather than the default "sent items" folder. Thanks. |
#3
|
|||
|
|||
![]() Eric wrote: The first two things are relatively simple. You need two macros: Sub DoNotSaveReply() 'Clears the 'Save sent messages to' option in the Message Options dialog Dim objMessage As Object Set objMessage = Application.ActiveInspector objMessage.CurrentItem.DeleteAfterSubmit = True Set objMessage = Nothing End Sub Sub RequestReadReceipt() 'Clears the 'Save sent messages to' option in the Message Options dialog Dim objMessage As Object Set objMessage = Application.ActiveInspector objMessage.CurrentItem.ReadReceiptRequested = True Set objMessage = Nothing End Sub Having sent items saved to a specific folder is a little tricker. Public Sub SaveReplyToSpecificFolder() On Error Resume Next Dim objMessage As Outlook.MailItem Dim objFolder As Outlook.MAPIFolder, objNS As Outlook.NameSpace Dim SentItemsFolderID As String Dim SentItemsFolderStoreID As String SentItemsFolderID = "00000000796361434A311F408F1D9BA8D935F32802810 000" SentItemsFolderStoreID = "0000000038A1BB1005E5101AA1BB08002B2A56C2000070737 47072782E646C6C00000000000000004E495441F9BFB80100A A0037D96E000000433A5C446F63756D656E747320616E64205 3657474696E67735C657269636C5C4C6F63616C20536574746 96E67735C4170706C69636174696F6E20446174615C4D69637 26F736F66745C4F75746C6F6F6B5C657269636C6D61696C2E6 D7670732E6F72672D30303030303031302E70737400" If Application.ActiveInspector.CurrentItem.Class Outlook.OlObjectClass.olmail Then Exit Sub Set objNS = Application.GetNamespace("MAPI") Set objFolder = objNS.GetFolderFromID(SentItemsFolderID, SentItemsFolderStoreID) If objFolder Is Nothing Then MsgBox "Unable to set Sent Message folder." Exit Sub End If Set objMessage = Application.ActiveInspector.CurrentItem Set objMessage.SaveSentMessageFolder = objFolder Set objNS = Nothing Set objMessage = Nothing Set objFolder = Nothing End Sub You can use Outlook Spy (http://www.dimastry.com) to easily get the EntryID and FolderID values for a specific folder, or use code (navigate to the folder, use ActiveExplorer.CurrentFolder, etc.). Otherwise, navigate the NameSpace.Folders collection to retrieve a specific MAPIFolder object. To map custom toolbar buttons to a macro, choose Macros from the Categories list in the Commands tab of the toolbar customization dialog, and select the macro on the right. -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ " wrote: Hi, I'd like to be able to add two shortcut buttons to the toolbar on a new mail message. Instead of clicking on Options Request a read receipt OR Options Save sent items...etc I'd like to be able to have a button right on the standard toolbar for each of these two options. It may only save a couple clicks but every click helps! Can I do this with VBA since there doesn't appear to be an option in the available shortcut buttons in "customize"? It would also be nice to customize where the sent message will be saved to rather than the default "sent items" folder. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding network folder shorcut as attachement to contact | pdehondt | Outlook - Using Contacts | 1 | July 10th 06 01:14 AM |
Big Message Rule - Alternative Options? | [email protected] | Outlook - General Queries | 2 | May 13th 06 03:17 AM |
create a shorcut on outlook to a folder on the system | cluelessdynamite | Outlook - General Queries | 2 | May 8th 06 02:08 PM |
Adding button to New Message Window | Joshua Ellul | Add-ins for Outlook | 5 | March 22nd 06 01:10 PM |
Outlook 2000 and Message Options window | apragent | Outlook and VBA | 1 | March 9th 06 06:39 AM |