Copy contents of Excel range name to Email Subject line

  • Thread starter Thread starter excel
  • Start date Start date
E

excel

I've written a few Macros in Excel, but never Outlook. I don't see a
macro recorder. All I'm trying to do is copy a range name from
timesheet.xls and put it in the subject line of an email I'm
composing. Can this be done? How?
 
If the code is in Excel and Outlook is already running:

Dim olApp as Outlook.Application
Dim Mail as Outlook.mailItem

set olApp=getObject(,"Outlook.Application")
set Mail=olApp.CreateIem(olMailItem)

Mail.Subject=YourRange.Name

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Wed, 06 Jun 2007 05:06:56 -0700 schrieb (e-mail address removed):
 
Is it possible to write the code in Outlook instead? For example,
you've already written teh email and are just trying to add a subject
line.

Thanks
 
Back
Top