![]() |
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 am looking for a way to implement the following. When email is sent with specific word/words in subject then prompt user with a yes/no/cancel question if they answer yes, then add something to the subject before the email is sent. If no, then just send, and if cancel, go back to the draft. I've only done a little VBA so far, so any help would be much appreciated. Thank-you |
Ads |
#2
|
|||
|
|||
![]()
Try this.
Code:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim Prompt As String, Response As Integer If InStr(1, Item.Subject, "WordToCompare", vbTextCompare) Then Prompt = "Do you wnat to add SOMETHING to the subject before sending?" Response = MsgBox(Prompt, vbYesNoCancel + vbQuestion, "Add to Subject") Select Case Response Case vbYes Item.Subject = Item.Subject & " SOMETHING" Case vbNo Exit Sub Case vbCancel Cancel = True End If End If End Sub Quote:
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
custom action: save or delete email after sending | robin | Outlook and VBA | 16 | May 21st 08 05:27 PM |
Custom action | Ian | Outlook - General Queries | 9 | April 23rd 07 10:05 PM |
Custom Action DLL with VB? | Menachem Bazian | Outlook - General Queries | 4 | August 18th 06 02:58 AM |
Outlook 2003 Custom Action on Outgoing Email Rules | Pankaj | Outlook and VBA | 1 | June 25th 06 10:35 AM |
custom action | adubb | Outlook - Using Forms | 1 | March 30th 06 09:17 PM |