#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ChuckF
 
Posts: n/a
Default Emailing Macro

Each day I take attendance for my group here at work. Is there a way
to create a macro that would emulate me hitting "File, Send To, Mail
Recipient, and enter the word "Attendance" (my distribution list) in
the TO: column.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Martin
 
Posts: n/a
Default Emailing Macro

This will create the email and attachment but you have to have saved the file
to do this (be interested to know how to do it with an open document). Make
sure you have M/soft Outlook Object Library ticked in Tools, References:

Sub myEmail()
Dim myOut As New Outlook.Application
Dim myItem As Outlook.MailItem
Set myItem = myOut.CreateItem(olMailItem)
myItem.Recipients.Add "Attendance"
' myItem.Subject = ...
myItem.Attachments.Add "c:\test.xls"
myItem.Display
End Sub


"ChuckF" wrote:

Each day I take attendance for my group here at work. Is there a way
to create a macro that would emulate me hitting "File, Send To, Mail
Recipient, and enter the word "Attendance" (my distribution list) in
the TO: column.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Paul B
 
Posts: n/a
Default Emailing Macro

In addition to Martin's code you may also want to have a look here for more
information on e-mailing from excel

http://www.rondebruin.nl/sendmail.htm#Tips
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"ChuckF" wrote in message
oups.com...
Each day I take attendance for my group here at work. Is there a way
to create a macro that would emulate me hitting "File, Send To, Mail
Recipient, and enter the word "Attendance" (my distribution list) in
the TO: column.



Reply
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
Editing a simple macro Connie Martin Excel Worksheet Functions 5 November 29th 05 09:19 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 07:50 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"