Results 1 to 5 of 5

Thread: Intercepting outgoing messages

  1. #1

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,810

    Intercepting outgoing messages

    Is there any way to get a message that would be sent (with Outlook) before it is send??
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  2. #2
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    You need to use the Application's "ItemSend" Event. This is an example from MSDN.

    VB Code:
    1. Private Sub myOlApp_ItemSend(ByVal Item As Object, Cancel As Boolean)
    2.     Prompt$ = "Are you sure you want to send " & Item.Subject & "?"
    3.     If MsgBox(Prompt$, vbYesNo + vbQuestion, "Sample") = vbNo Then
    4.         Cancel = True
    5.     End If
    6. End Sub

  3. #3

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,810
    Yes... but I mean with Outlook. I mean, my app is not sending the email, Outlook would do it. Is there any "message" you could "read" from Outlook when the Send event is fired, and eventually, cancel this action?
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  4. #4
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    Yes, as far as I understand it, just use

    WithEvents myOlApp as Outlook.Application.

    see
    http://msdn.microsoft.com/library/de...Automation.asp for more details.

  5. #5

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,810
    Excellent!! That was what I was needing!

    THANKS A LOT!!
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width