LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
carl
 
Posts: n/a
Default Email and Excel Problem

I've been using this code and it has been working great:

'Sub Mail_ActiveSheet_Body()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = "abc.com"
.CC = "efg.com"
.BCC = ""
.Subject = Sheets("trading").Range("A9").Value
.HTMLBody = SheetToHTML(ActiveSheet)
.Send 'or use .Display

Now when I run the macro, I get an Outlook message that

" A program is trying to automatically send e-mail on your behalf. Do you
want to allow this ?

The window gives me choices Yes, No, Help.

If I say yes. the email goes out. If I say no, the vba gets stuck on the
last line of the code above.

Is there any way to stop this outlook message - speed is very important in
my application and this Outlook message really slows things down.

Thank you in advance.

 
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
sending email from excel not working Tripp Excel Discussion (Misc queries) 2 February 1st 06 08:42 PM
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER MEGTOM New Users to Excel 5 October 27th 05 03:06 AM
Problem opening excel files from email DXC001 Excel Discussion (Misc queries) 1 October 3rd 05 07:56 PM
problem with downloading Data into Excel 2003 RAGHAVAN JAYARAMAN Excel Discussion (Misc queries) 4 September 30th 05 10:06 PM
Excel Send To function problem kysiow Excel Discussion (Misc queries) 1 December 10th 04 01:37 AM


All times are GMT +1. The time now is 11:41 PM.

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"