+ Reply to Thread
Results 1 to 3 of 3

copy data into body of email without using outlook

  1. #1
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    copy data into body of email without using outlook

    Hey all,
    So I am currently using a script to match data entered vs data already on a sheet, consolidate it into a different cell. then send the data to myself in email.(without using outlook that is) I would like for the macro to copy a 2 columns and place them into the body of the email. Can someone help me accomplish this feat. This is the current macro I am using...
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 12-26-2012 at 10:00 PM. Reason: Added Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: copy data into body of email without using outlook

    Hello vitt4300,

    Welcome to the Forum!

    It is not clear in your post which 2 columns of data you copy into the email. You need to be specific when asking for help. It is better to have to much detail than not enough.

    Also, do you want the columns to be in plain text or copy them as they appear on the worksheet with formatting, colors, etc?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    11-14-2012
    Location
    Kentucky
    MS-Off Ver
    Office 16
    Posts
    112

    Re: copy data into body of email without using outlook

    I'm sorry,
    You are correct I did not, I have been racking my brain over this for awhile and made the post in a hurry. For that I apologize, The columns I need to be copied into the body are J12:L1000, so J12:J1000, K12:K1000, L12:L1000. Plain text is fine or copy them as they appear in the worksheet, I'm not picky . Right now everything works fine except for copying into the body. This section of the macro is what I have been changing,


    With iMsg
    Set .Configuration = iConf
    .To = "*******"
    .CC = "******"
    .BCC = "******"
    .From = """*****"" <[email protected]>"
    .Subject = "Rack Audit"
    .body = strbody = "Hi there" & vbNewLine & vbNewLine & _
    range("J13:J1000") & vbNewLine & _
    range("K13:K1000") & vbNewLine & _
    range("L13:L1000") & vbNewLine & _
    AddAttachment TempFilePath & TempFileName & FileExtStr
    .Send
    End With

    the the macro works with this

    With iMsg
    Set .Configuration = iConf
    .To = "*******"
    .CC = "******"
    .BCC = "******"
    .From = """*****"" <[email protected]>"
    .Subject = "Rack Audit"
    .TextBody = "Hi there"
    .AddAttachment TempFilePath & TempFileName & FileExtStr
    .Send
    End With


    If there is any other information I can help with please let me know. If I knew how to add the sheet to this I would a little new to the forum.

    I would like to be able to use a string like this if its possible

    .HTMLbody = Sheets("dashboard").Select.range("J12:L1000").Copy.PasteSpecial
    Last edited by vitt4300; 12-27-2012 at 11:49 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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