Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 20th, 2003, 12:25 PM
rkelley's Avatar
rkelley rkelley is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Oklahoma
Posts: 159 rkelley User rank is Private First Class (20 - 50 Reputation Level)rkelley User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Excel macro help

I am writing a macro in excel that email the spreadsheet as an attachment using this code:

Application.Dialogs(xlDialogSendMail).Show _
arg1:="some_static_email@here", _
arg2:="Emailing this Work Sheet"

my question is, how can i make VB automatically send the message so the user does not have to click send? btw, this opens up an outlook window.

Thanks,

rkelley

Reply With Quote
  #2  
Old May 21st, 2003, 12:46 AM
mohecan mohecan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: Melbourne, Australia
Posts: 212 mohecan User rank is Private First Class (20 - 50 Reputation Level)mohecan User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
The following should work.
Code:
ActiveWorkbook.SendMail recipients:="emailaddress@here.com"


This uses the VBA SendMail client rather that the Excel dialog boxes.


HTH
__________________
How can I soar like an eagle when
I'm flying with turkey's?

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Excel macro help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway