Paste ClipBoard to Excel Range

Mar 26, 2013 at 5:43 PM
Edited Mar 27, 2013 at 9:56 AM
Hello,

Someone any idea how I can paste my ClipBoard content into a range?

html is a html file.
Clipboard.SetText(html);
Like that I can visualize HTML code in
sheet.Range("A1").Value = Clipboard.GetText();
But it will be interpret like text and will appear as text also.

If I don't do that and I open my Excel and do PasteSpecial, I can in fact paste the content of
Clipboard.SetText(html);
And my table will be a real table in Excel.

I thought about doing with PasteSpecial and to give him Parameter the html file.
sheet.PasteSpecial(Clipboard.GetText()); //throws error
Thanks.

Mike
Mar 27, 2013 at 9:57 AM
Found it with a bit of research...

Clipboard.SetText(html);
sheet.Range("A1").PasteSpecial();