Paste Html Error on ppt 2007

A

Albus2

Hi to everybody ..
I have a problem with power point 2007
when i try to use the Paste method of
Microsoft.Office.Interop.PowerPoint.Shapes
it's return " Shapes (unknown member) : Invalid request. clipboard is empty
or contains data which may be not pasted here ".



The contents that i try to paste is an Html string, I post here my code:

using PowerPoint = Microsoft.Office.Interop.PowerPoint;

string html = @"Format:HTML Format
Version:1.0
StartHTML: 165
EndHTML: 444
StartFragment: 303
EndFragment: 412
StartSelection: 303
EndSelection: 303
<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">
<HTML><HEAD><TITLE>From
Clipboard</TITLE></HEAD><BODY><!--StartFragment--><div>prispolo <img
src=""http://upload.wikimedia.org/wikipedia/en/b/b9/Alien3_poster.jpg""
alt="""" /></div><!--EndFragment--></BODY></HTML>";

Clipboard.Clear();
Clipboard.SetText(html, TextDataFormat.Html);

PowerPoint.ShapeRange spr = slide.Shapes.Paste();


This code work on ppt2003.

Thanks for attention.
 
A

Albus2

Thank Steve for your answer

I have install the sp2 for Office 2007 but the
error is still the same..

others suggestions??
 
A

Albus2

My problem is paste the html into a slide, if i can't use
the Shapes.Paste method how can do that?
I need to parse each element of the file and paste
in a specific shape?
I believe there is one easy way :)

Thank Steve for your attention
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top