Consulting

Results 1 to 2 of 2

Thread: emailing cell range

  1. #1
    VBAX Regular
    Joined
    Mar 2009
    Posts
    48
    Location

    emailing cell range

    hi guys

    I have a cell range

    [FONT='Arial','sans-serif']Set rng = ActiveSheet.Range(Cells(1, 1), Cells(13, 2)).Select[/FONT]
    [FONT='Arial','sans-serif'][/FONT]
    [FONT='Arial','sans-serif']I wish to email this to certain parties however i cannot get the data into an email [/FONT]
    [FONT='Arial','sans-serif'][/FONT]
    [FONT='Arial','sans-serif'][FONT='Arial','sans-serif']Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)[/FONT]


    [FONT='Arial','sans-serif'] With OutMail
    .To = "paul2.harvey@baml.com"
    .CC = ""
    .BCC = ""
    [/FONT]
    [FONT='Arial','sans-serif'][/FONT]
    [FONT='Calibri','sans-serif']Mysubject = [/FONT][FONT='Arial','sans-serif']Sheets("Treasury Data").cell("E1")[/FONT][FONT='Calibri','sans-serif'][/FONT]
    [FONT='Calibri','sans-serif'] [/FONT]
    [FONT='Calibri','sans-serif'] [/FONT]
    [FONT='Arial','sans-serif'].Subject = [/FONT][FONT='Arial','sans-serif']“” & mysubject & “”[/FONT][FONT='Arial','sans-serif']

    .Display
    End With
    [/FONT]

    [FONT='Arial','sans-serif']I know this is pretty crude. the subject code is not working and i cannot work out the code to get the contents (rng) into the mail. any ideas?[/FONT]
    [FONT='Arial','sans-serif'][/FONT]
    [FONT='Arial','sans-serif']your help is appreciated[/FONT]
    [FONT='Arial','sans-serif'][/FONT]
    [FONT='Arial','sans-serif']Thanks[/FONT]
    [FONT='Arial','sans-serif'][/FONT]
    [FONT='Arial','sans-serif']JZB


    [/FONT]
    [/FONT]

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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