Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to have excel not only attach a file to email through a
macro but type the subject and address an email as well Can someone shoot me some sample code. Thanks - Michael Burkett |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Michael
Just typed this in off my head. Post if you have any problems getting this running. My example uses Outlook 98. Good thing is to set a reference to the Outlook libray through ToolsReferences and explore the properties and functions through the Object Library. Sub quickandnasty() Dim olApp As Object Dim eml as Outlook.MailItem Set olApp = CreateObject("Outlook.Application") Set eml = olApp.CreateItem(0) eml.recipients.add " eml.cc = " eml.subject = "hi there" eml.body = "hi there" eml.send set olApp = nothing set eml = nothing End sub mburkett wrote: Is there a way to have excel not only attach a file to email through a macro but type the subject and address an email as well Can someone shoot me some sample code. Thanks - Michael Burkett |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, missed one bit of the example:
eml.attachments.add "c:\myfile.txt" |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Macro how to create email link for the email addresses in aRange or Selection | Excel Worksheet Functions | |||
send wkbk as an email attachment with an email address copied from | Excel Discussion (Misc queries) | |||
can I copy a column of email addresses, paste into email address? | New Users to Excel | |||
Transfer Email addresses from spreadsheet to email address book | Excel Discussion (Misc queries) | |||
Email editor closes when forwarding Excel-embedded email | Setting up and Configuration of Excel |