Copy and paste from Outlook

LEXCERM

Registered User.
Local time
Tomorrow, 06:30
Joined
Apr 12, 2004
Messages
169
Hi all, hope you can help. I have been Googling and searching all morning, but am still stumped. :o

I have code which extracts the "body" of an Outlook message and populates to an excel spreadsheet. The problem is that it is very difficult to delimit the data once in excel as many "question marks in boxes" appear within the data.

I want to mimic the operation of:-
1) selecting ALL of the data in the body of a message
2) copying the data
3) pasting straight to excel.

Doing this manually, the data is pasted in a much better format and is easy to delimit.

Hope this makes sense.

Thanks in advance,
Paul.
 
P.s. Forgot to mention that when using my existing code, it puts the whole content of the email body into on excel cell. When manually copying and pasting, the message is pasted over several rows and replicates the body of the email. Thanks.
 
I am guessing here, but there are two things I would be looking at.

1. what type of email is it - HTML, RTF, TEXT
2. what "type" of paste are you doing into excel.

What I would suggest is you do it manually like you have but record a macro in excel while you do it. Use the paste special to paste it like you want, then look at the resulting code. This might show you the exact code for the pasting options you need.
 
Thanks for replying Darbid.

I've actually gone a different root and saving the data to a text file which gives me more scope to format the data to how I want it.

Cheers again.
 

Users who are viewing this thread

Back
Top Bottom