473,326 Members | 2,173 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Send Excel data to Outlook in message area

atljpe
11
Simply looking for a code that will take data from an excel spreadsheet to inline text in a new message in outlook. Not an attachment, that I can do. I Just cannot figure out how to send data to outlook in the message area via VBA.
Jan 19 '07 #1
2 1871
iburyak
1,017 Expert 512MB
1. Go through Excel document and loop through all rows and columns to collect data into a variable. Let’s say this variable will be sExcelData

2. Send collected text via e-mail
[PHP]
Dim objOutlook
Dim objMailItem
set objOutlook = createobject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem)

With objMailItem
.To = "e-mail address"
.Subject = "put subject here"
.Body = sExcelData
.Send
End With

Set objOutlook = Nothing
Set objMailItem = Nothing[/PHP]
Jan 19 '07 #2
atljpe
11
iburyak......That was perfect....thanks from atljpe

1. Go through Excel document and loop through all rows and columns to collect data into a variable. Let’s say this variable will be sExcelData

2. Send collected text via e-mail
[PHP]
Dim objOutlook
Dim objMailItem
set objOutlook = createobject("Outlook.Application")
Set objMailItem = objOutlook.CreateItem(olMailItem)

With objMailItem
.To = "e-mail address"
.Subject = "put subject here"
.Body = sExcelData
.Send
End With

Set objOutlook = Nothing
Set objMailItem = Nothing[/PHP]
Jan 22 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to...
5
by: Saiyan Vejita | last post by:
I've been working with ASP for 6+ years now, but in that time I've never had any solid advice on how to build a secure system. So I thought I'd ask here first. Anyway, here's the situation: I...
4
by: tp | last post by:
HI... I have created simple .asp page and i would like to send my page as email using my outlook . is it possible to send form body as new email outlook body using mailto command or any other...
9
by: Paul | last post by:
Hi all Arggghhh........... The problem.....I want the user to be able to create an excel document and name particular cells in the document where they want the data to be placed and then save...
0
by: JohnG | last post by:
Hi guys, Anyone give me a clue why this code doesn't work ------------------------------------- Public Function MailIt() On Error GoTo MailIt_Err DoCmd.SendObject acSendTable, "tblXXYY",...
2
by: sunilkeswani | last post by:
I would like ms access to send out an email through outlook, with a speicific attachment, to a group of email IDs... Could someone please help with the code? I use MS Acess 2000 & Outlook 2000 ...
5
by: Sean | last post by:
Hi... I want to use the macro/sendobject (or any other procedure) to send the contents of a table (very small, ~5 rows/columns) as an Outlook message body, not as an attachment. Access 2000 will...
1
by: divya | last post by:
I have a form which has a textarea,name - txtTo where he adds email addresses.Now when he clicks on sendemail I want to open a mailto link with addresses taken from textarea. Example I added...
1
by: pixie | last post by:
Hi. Access 2003. The database stores contract information. I have a query for each person that is responsible for contracts. The query checks to see if there are reports due either this week,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.