LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Outlook Email

Hi All
I am using Outlook to send emails from within Excel 2003. The security
message asking using to confirm they wish to send appears as expected. If
the uses presses 'Yes' everytnig works OK. How do I detect if the user
presses either the 'No' or 'Cancel' control as this causes an error.

Cheers
Nigel RS

Snippet of code follows.....
-----------------------------------------------------------
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)

With OutMail
.To = xmailAdd
.Subject = "CFAM File: " & xFName
.Attachments.Add xmailAttach, olByValue, 1, "Data File"
.DeleteAfterSubmit = False
On Error Resume Next
.Send
End With

Set OutMail = Nothing
Set OutApp = Nothing
--------------------------------------------------------
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up Outlook email? new at outlook set up New Users to Excel 2 March 5th 09 08:31 AM
Excel and Email/Outlook Carl Excel Worksheet Functions 2 January 5th 07 11:56 AM
Outlook Email Jame-O New Users to Excel 1 November 7th 06 05:53 PM
Email & Outlook Chris Excel Discussion (Misc queries) 0 March 14th 06 12:04 PM
Late Binding to Outlook from Excel: Outlook modifies email body Lenny Wintfeld Excel Programming 0 December 12th 04 04:03 PM


All times are GMT +1. The time now is 05:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"