• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Extract email from outlook to excel in html format

Well, let's think this through. You're going to write a program in Excel that
a) Opens an email.
b) Makes sure it's in HTML format.
c) Gets a copy of the email body.
d) Pastes the text into a cell in Excel.

Is that right? If so, which part do you not know how to do? Seems to me it's better to narrow down the problem to just the part you're not sure about, rather than waste your time talking about the things you already know how to do.
 
Well, let's think this through. You're going to write a program in Excel that
a) Opens an email.
b) Makes sure it's in HTML format.
c) Gets a copy of the email body.
d) Pastes the text into a cell in Excel.

Is that right? If so, which part do you not know how to do? Seems to me it's better to narrow down the problem to just the part you're not sure about, rather than waste your time talking about the things you already know how to do.
Yes, I want the extraction in excel to be in html format. I want to reply to the email through vba. So when I extract it, while reply through vba, the email is coming in value of cell format and becomes a single liner. If it is in html format while reply it should show the copy of the original mail.
 
Let me rephrase, to confirm that I understand you: You have a program that copies the body of the email (in HTML format) and pastes it into a cell in an Excel worksheet. But Excel is then displaying the value of the email body as one long character string—and you're seeing the HTML tags, too, so it's not formatted with lines and paragraphs and indentation but just one long string. Is that correct?

If so, I guess what you're asking is how to get Excel to display it with the HTML tags correctly interpreted—with actual bold and italic and underlined text, and broken up into lines and so forth. The quick answer is that I don't think Excel can do that. If it can, I don't know about it.

But why do you want Excel to do that? Word or Outlook can, and after all you want to answer the email in VBA. Why bring Excel into it at all? Why not just answer the email using VBA and Outlook?
 
Let me rephrase, to confirm that I understand you: You have a program that copies the body of the email (in HTML format) and pastes it into a cell in an Excel worksheet. But Excel is then displaying the value of the email body as one long character string—and you're seeing the HTML tags, too, so it's not formatted with lines and paragraphs and indentation but just one long string. Is that correct?

If so, I guess what you're asking is how to get Excel to display it with the HTML tags correctly interpreted—with actual bold and italic and underlined text, and broken up into lines and so forth. The quick answer is that I don't think Excel can do that. If it can, I don't know about it.

But why do you want Excel to do that? Word or Outlook can, and after all you want to answer the email in VBA. Why bring Excel into it at all? Why not just answer the email using VBA and Outlook?
Hi, Yes you are right about my requirement. I want to send reply of all the emails at a time rather than finding one by one in outlook and responding each email. The only challenge I am facing right now is the email is showing as a single string. I cannot see any html tags. Here I want the emails to get imported in excel with only specific subject line and time. Once I get the email in excel, I will work on it and respond to all the emails at a time.
 
Wait, you say you want to import into Excel only the subject line and the time? Not the email body? Why, then, are you copying the email body to Excel?

Let's start from the beginning. You have a program. It opens an email, right? It then copies something from the email to Excel. What (exactly) is it copying to Excel?
 
Ok, you want all the data from the email. But then why did you say "...with only specific subject line and time"? Oh, you mean you want to look at all the emails and select only the ones with a specific subject line and time, and copy those but not the others. Is that right?

If so, next question: You copy over this data to an Excel worksheet, and you see that the data is displayed as one long line in a worksheet cell. If that's a problem for you, you can tell Excel to "wrap" the text. Would that solve your problem?
 
Back
Top