Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Jan 2002
    Location
    Mumbai, India
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel SendMail - Message Body Text (Excel 2000 SR1)

    Hi --

    I've searched the Excel forum for this problem, but not found anything that solves it.

    I've got a VBA routine that uses the Application.Sendmail command

    <pre> ActiveWorkbook.SendMail _
    Recipients:=Range("rg.EMailAddress").Value, _
    Subject:=Range("rg.DivisionName").Value & _
    " - Order Delivery Performance"
    </pre>


    This works perfectly and creates messages in the Outbox of Outlook Express (v5.00), with the Activeworkbook as an attachment.

    However, the messages are completely blank.
    Is there any way that I can add some standard text to the messages, like

    "I'm sending your Division's Order Delivery Performance file with this e-mail.
    Please give your comments in the space provided and return this file by e-mail
    Regards,
    Khushnood"

    Thanks in advance
    Khushnood

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Excel SendMail - Message Body Text (Excel 2000 SR1)

    You want to use the Route method instead:
    <pre>Message Property Example (from Help file)

    This example sends Book1.xls to three recipients, one after another.

    Workbooks("BOOK1.XLS").HasRoutingSlip = True
    With Workbooks("BOOK1.XLS").RoutingSlip
    .Delivery = xlOneAfterAnother
    .Recipients = Array("Adam Bendel", _
    "Jean Selva", "Bernard Gabor")
    .Subject = "Here is BOOK1.XLS"
    .Message = "Here is the workbook. What do you think?"
    End With
    Workbooks("BOOK1.XLS").Route</pre>

    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel SendMail - Message Body Text (Excel 2000 SR1)

    I have a XL file that I have been using to create Outlook98 e-mail messages that can attach up to five files with different extensions. The e-mail message can contain three paragraphs or more if you modify the code. The code references the Outlook98 Type Library.

    I would have attached a compressed file but it exceeds the 100k limit for posting to this site. If you would like to receive the file please contact me with your e-mail address and I will send it to you.

    John

  4. #4
    Lounger
    Join Date
    Jan 2002
    Location
    Mumbai, India
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel SendMail - Message Body Text (Excel 2000 SR1)

    Thanks Sammy

    You were spot on ! It worked like a charm...
    Maybe I'm being a bit effusive, but this was an irritating problem ...

    Just one more thing. Is there any way to eliminate the last line that Excel adds to the message ---
    <hr>----------The enclosed document has a routing slip. You are the last recipient; no further routing is necessary.<hr>

    Yes, yes, first I wanted to add text, now I want to delete text.... heh heh heh...

    John, your solution sounds interesting.
    Could you please e-mail the attachment to me at Khushnood ?

    Though I don't use Outlook 98 or 2000, I might need it some other time.

    Thanks again both of you...

    Khushnood

  5. #5
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Excel SendMail - Message Body Text (Excel 2000 SR1)

    I don't see any way to remove the postlog, but I've never used routing. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  6. #6
    Lounger
    Join Date
    Jan 2002
    Location
    Mumbai, India
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel SendMail - Message Body Text (Excel 2000 SR1)

    Thanks Sam...

    Let's hope someone else comes up with that too ! :-0

    It's not such a big thing, anyway...
    I'm happy that my original problem is now solved !

    Ciao
    Khushnood

  7. #7
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Excel SendMail - Message Body Text (Excel 2000 SR1)

    I cannot test this, but try replacing

    .Delivery = xlOneAfterAnother

    with

    .Delivery = xlAllAtOnce

    and also try including

    .TrackStatus = False

    Andrew C

  8. #8
    Lounger
    Join Date
    Jan 2002
    Location
    Mumbai, India
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel SendMail - Message Body Text (Excel 2000 SR1)

    Hi Andrew --

    I've already done both these :-)

    If you set .Delivery = xlOneAfterAnother then a different message is appended to the message.

    Thanks
    Khushnood

Posting Permissions

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