Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
pvp pvp is offline
external usenet poster
 
Posts: 1
Default Emailing from Excel

Is it possible to enter Outlook Express from Excel, using
a bunch of cell in the spreadsheet as the TO addresses for
the email. And other cells as Subject, CC, ...
And then fill in the email and add attachments in Outlook
before sending it.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Emailing from Excel

Sub EmailFromExcel()

Dim olApp As Outlook.Application, olMail As
Outlook.MailItem
Dim Rng As Range
Dim objOLAttach As Outlook.Attachment

iPath = 'YOUR FILE PATH GO'S HERE

Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
olMail.To = Range("to_addresses").Value 'this is a
cell reference for your 'To' email addresses
olMail.CC Range("cc_addresses").Value 'this is a cell
reference for your 'CC' email addresses
olMail.BCC = Range("bcc_addresses").Value 'this is a
cell reference for your 'BCC' email addresses


'email subject here
olMail.Subject = "REPLACE THIS TEXT WITH YOUR EMAIL
SUBJECT"

'main message here
olMail.Body = "Dear ExcelAid" _
& vbCrLf & vbCrLf & "REPLACE THIS TEXT WITH
THE BODY TEXT FOR YOUR EMAIL." _
& vbCrLf & vbCrLf & "Regards," _
& vbCrLf & vbCrLf & "ExcelAid," _
& vbCrLf & "

'attachment
olMail.Attachments.Add iPath 'this will attach the
file you declared earlier.

olMail.Display 'DISPLAYS THE EMAIL

olMail.Send 'WILL AUTO SEND THE EMAIL

End Sub

You will need to have 9.0 Microsoft Outlook Object Library
checked within VB. The 9.0 may vary depending on the
version of Excel you are using.


regards

Kerry Bennett
www.excelaid.com

-----Original Message-----
Is it possible to enter Outlook Express from Excel, using
a bunch of cell in the spreadsheet as the TO addresses

for
the email. And other cells as Subject, CC, ...
And then fill in the email and add attachments in Outlook
before sending it.

Thanks
.

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
Emailing from Excel John McAlaney Excel Discussion (Misc queries) 2 May 6th 08 05:32 PM
Emailing from within Excel Reggiee Excel Discussion (Misc queries) 0 October 1st 07 09:29 AM
emailing from Excel Roger Excel Discussion (Misc queries) 0 July 2nd 07 07:14 PM
Emailing Excel? JoeBed Excel Discussion (Misc queries) 2 May 5th 06 09:16 PM
Emailing Excel lsmft Excel Discussion (Misc queries) 4 March 17th 06 11:59 AM


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