+ Reply to Thread
Results 1 to 12 of 12

Copy Email Body to Excel paste value (Match Destination Formatting)

  1. #1
    Registered User
    Join Date
    08-12-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    18

    Copy Email Body to Excel paste value (Match Destination Formatting)

    using the below code Im able to copy Date and Time and the body of each email in specific folder in outlook to Excel into cell A3 and B3 one at a time. However, the entire body is copied onto one cell. I need to add the following functions:

    to copy from a specific text from the body "NAME:" to the end of the body and Paste Value to cell B3

    when I manually copy the body and paste over I get Match Destination Formatting on the right click as an option which is exactly how I wanted to be Pasted over. this does not copy the entire Body to just B3 matches what the body of the email looks like into excel.

    Please Login or Register  to view this content.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    not clear on what you're asking. you said this:
    Quote Originally Posted by korekurd View Post
    However, the entire body is copied onto one cell.
    OK, well that is clear obviously.

    but then:
    Quote Originally Posted by korekurd View Post
    when I manually copy the body and paste over I get Match Destination Formatting on the right click as an option which is exactly how I wanted to be Pasted over. this does not copy the entire Body to just B3 matches what the body of the email looks like into excel.
    not getting that either. It's not clear. can you clarify? what line of code is the problem?

  3. #3
    Registered User
    Join Date
    08-12-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    18

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    Sorry for the confusion. This line Is not exactly what I need Range("B2").Offset(i, 0).Value = OutlookMail.Body. With this line the body of the email is in “B3” and “B3” only. The email consist of the following

    “Name:
    Employee:
    Signature_____________”

    Followed by a table 10 columns x 61 rows.

    The above codes puts everything including the table in Cell B3. I need the formatting from the table in the body to transfer as is to excel.

    Also the email also included text or messages before

    “Name:
    Employee:
    Signature_____________”

    I will not need anything before this just start with it and the table below.

    hope this makes it more clear.

  4. #4
    Registered User
    Join Date
    08-12-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    18

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    The email layout can be viewed in excelforum.com post number 5388245

  5. #5
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    Quote Originally Posted by korekurd View Post
    The email layout can be viewed in excelforum.com post number 5388245
    post the URL, please?

  6. #6
    Registered User
    Join Date
    08-12-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    18

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    I get the following error message when trying to post links "You are not allowed to post any kinds of links, images or videos until you post a few times."

    the post title is "Re: VBA extract Data from specific location in body of Outlook To Excel"

  7. #7
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    put the URL link in a text and upload the .txt file as an attachment to your post. either that or take a screenshot of the URL on your computer (use the PRINT SCREEN button or the GAME BAR in win 10) and upload that image file to your post.

  8. #8
    Registered User
    Join Date
    08-12-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    18

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    Here is the image
    Attached Images Attached Images

  9. #9
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    no one answered you in the other thread. maybe that's because you addressed people here as ""the TEAM""? That sounds a little strange to me, man. no one gets paid here for helping. regardless, I will look at this issue of yours later today.

    https://www.excelforum.com/excel-pro...-to-excel.html

  10. #10
    Registered User
    Join Date
    08-12-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    18

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    Thanks vba_php for the feedback.

    with the above email body format in the image above, Im trying to accomplish the following:

    To copy everything starting from "NAME:" to the end of email body and get it Pasted with to excel keeping the format. Thank you so much for helping me out. Let me know if I need to clarify anything else.

    Thanks

  11. #11
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    ok korekurd,

    I have now looked at this. here are my questions for you, which should open this up to discussion:

    => what TYPE of object is in the image you posted? (I have also included the image again at the bottom of this post). is it an embedded word doc? that's what it looks like, considering that it looks like it has mail merge fields in it.

    => is it just ONE object? or is the calendar an object, and the rest of the text just in the actual email itself?

    => HOW did you get the content into the body of the email to begin with? copied it from another source and pushed the PASTE button in Outlook?

    => obviously you are trying to automated the capturing of the data that your customer fills in after you send that to them. more than likely, when they do fill it out, it will come back to you in the same form/layout/nature that you sent it in, regardless of what email client they are using.

    => how familiar are you with Outlook's VBA object model? that knowledge would help you out a great deal here.

    So.....please answer all of those and we will proceed with a solution and/or ideas on how to do this. If indeed, there is a solution.
    Attached Images Attached Images

  12. #12
    Registered User
    Join Date
    08-12-2020
    Location
    USA
    MS-Off Ver
    2016
    Posts
    18

    Re: Copy Email Body to Excel paste value (Match Destination Formatting)

    So sorry for the late reply but I was able to find something online and modify to my preferences but got it to work. here was my final product just incase others are looking for solution. its copying Tables in email body to Excel that I need done.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy paste into body of email
    By Hassan1977 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-18-2018, 04:50 PM
  2. Copy word document and Paste it as body of Email in Outlook (using VBA from Excel)
    By Asacras in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-06-2017, 10:23 AM
  3. [SOLVED] Copy and paste body of unread email from a specific folder to excel
    By Teblol in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2016, 04:04 PM
  4. Copy and paste Excel range as picture into Outlook email body using excel vba
    By ExcelDoc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-17-2016, 09:29 PM
  5. Is there a way to Copy And Paste Excel Range As Picture Into Outlook Email Body Using Exc
    By dineshsachidananda in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2014, 09:00 AM
  6. Paste Conditional formatting into Outlook email body
    By tabkaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2013, 07:58 PM
  7. [SOLVED] Copy and paste 2 excel sheets in message body of email
    By rrmando in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-03-2006, 05:10 PM

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