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 and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Custom Action when sending email



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 26th 10, 08:16 PM
Bruce Byrne Bruce Byrne is offline
Junior Member
 
First recorded activity at Outlookbanter: Jul 2010
Posts: 1
Default Custom Action when sending email

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  
Old July 30th 10, 06:48 PM
ruve1k ruve1k is offline
Junior Member
 
First recorded activity at Outlookbanter: Jul 2010
Posts: 2
Default

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:
Originally Posted by Bruce Byrne View Post
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
 




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


All times are GMT +1. The time now is 04:33 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-2025 Outlook Banter.
The comments are property of their posters.