Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying Excel Data Into Outlook via macro
So I had a form in Excel 03, and my hope is to push a macro button and
have the form be copied into the body of an Outlook 03 email. Current, using the code below I'm able to copy one cell into the body (in the case below, "A2"). When I change it from olMail.Body = Range("A2") to olMail.Body = Range("A2:C14"), which is the true range I want copied over, I get an "Array lower bound musy be zero" error. Any ideas? Thx ================================ Sub email() Dim olApp As Object, olMail As Object Set olApp = CreateObject("Outlook.Application") Set olMail = olApp.CreateItem(0) olMail.To = " olMail.Subject = Range("B4") olMail.Body = Range("A2") olMail.Display 'Reactive Excel AppActivate "Microsoft Excel" End Sub =================================== |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying Excel Data Into Outlook via macro
This shoudl get you to where you want to be:
http://www.rondebruin.nl/sendmail.htm Outlook object model (body) Regards, Ryan--- -- RyGuy " wrote: So I had a form in Excel 03, and my hope is to push a macro button and have the form be copied into the body of an Outlook 03 email. Current, using the code below I'm able to copy one cell into the body (in the case below, "A2"). When I change it from olMail.Body = Range("A2") to olMail.Body = Range("A2:C14"), which is the true range I want copied over, I get an "Array lower bound musy be zero" error. Any ideas? Thx ================================ Sub email() Dim olApp As Object, olMail As Object Set olApp = CreateObject("Outlook.Application") Set olMail = olApp.CreateItem(0) olMail.To = " olMail.Subject = Range("B4") olMail.Body = Range("A2") olMail.Display 'Reactive Excel AppActivate "Microsoft Excel" End Sub =================================== |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying Excel Data Into Outlook via macro
Worked like a charm. Thanks!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
accessing outlook data using excel macro | Charts and Charting in Excel | |||
Copying Data from Excel to MS Outlook in Plain Text Mode | Excel Worksheet Functions | |||
Macro to create a Outlook Appointment from excel cell data | Excel Programming | |||
Copying Excel schedules to different Outlook Calendars | Excel Discussion (Misc queries) | |||
Help Copying from Outlook to Excel | Excel Programming |