+ Reply to Thread
Results 1 to 2 of 2

Excel Email: Address and portion of body in cell

  1. #1
    Registered User
    Join Date
    10-27-2005
    Posts
    16

    Excel Email: Address and portion of body in cell

    I am using Ron De Brun's code for emailing a single sheet from a workbook using Outlook. I want to have a cell that the macro will read from and make that where the email is sent.

    I found this portion of the code on his website

    .SendMail Sheets("mysheet").Range("a1").Value, _
    "This is the Subject line"


    Where would I add it, and would I have to delete a portion of this area of the code?

    With OutMail
    .To = ""
    .CC = ""
    etc etc.

    Also, I would like to have a cell that has an order number in it that would be changeable from the excel sheet. I then want the order number to appear in the email in the subject or Body of the email. For example, " Your order number is "$A$1" or something of the like, but I doubt it would be that simple.

  2. #2
    Ron de Bruin
    Guest

    Re: Excel Email: Address and portion of body in cell

    Hi

    > SendMail Sheets("mysheet").Range("a1").Value, _
    > "This is the Subject line"


    This is a tip if you use SendMail but you use the Outlook object model

    See
    http://www.rondebruin.nl/mail/tips2.htm

    You can do the same for the subject

    ..Subject = "Your order number is " & ThisWorkbook.Sheets("Sheet1").Range("A1").Value



    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "pete3589" <[email protected]> wrote in message
    news:[email protected]...
    >
    > I am using Ron De Brun's code for emailing a single sheet from a
    > workbook using Outlook. I want to have a cell that the macro will read
    > from and make that where the email is sent.
    >
    > I found this portion of the code on his website
    >
    > SendMail Sheets("mysheet").Range("a1").Value, _
    > "This is the Subject line"
    >
    >
    > Where would I add it, and would I have to delete a portion of this area
    > of the code?
    >
    > With OutMail
    > To = ""
    > CC = ""
    > etc etc.
    >
    > Also, I would like to have a cell that has an order number in it that
    > would be changeable from the excel sheet. I then want the order number
    > to appear in the email in the subject or Body of the email. For
    > example, " Your order number is "$A$1" or something of the like, but I
    > doubt it would be that simple.
    >
    >
    > --
    > pete3589
    > ------------------------------------------------------------------------
    > pete3589's Profile: http://www.excelforum.com/member.php...o&userid=28402
    > View this thread: http://www.excelforum.com/showthread...hreadid=484294
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1