hI aLL,
Hopefully someone has encountered this before. I have however found very
little on the subject. I'lm looking to copy some HTML text from the clipboard
and use the pasteSpecial command in a C# .Net application to populate a text
range in Powerpoint. I have the following code which as far as i can see
should work:
myShape.TextFrame.TextRange.PasteSpecial(PpPasteDataType.ppPasteHTML,
Microsoft.Office.Core.MsoTriState.msoFalse, "", 0, "",
Microsoft.Office.Core.MsoTriState.msoFalse);
Everytime i run this though i get an error stating:
The specified value is out of range.
Can anyone shed any light on this and how to resolve my problem. Any help is
greatly recieved.
Thanks in advance,
G
Steve Rindsberg - 26 Mar 2008 16:38 GMT
> hI aLL,
>
[quoted text clipped - 14 lines]
> Can anyone shed any light on this and how to resolve my problem. Any help is
> greatly recieved.
PasteSpecial is only available in PPT 2003 or higher, so if you're using an
earlier version, this won't work at all (but you'd get a different error
message, so I don't think that's the immediate problem).
I'm pretty sure you'll get this error msg when you try to PasteSpecial and
choose a format that's not on the clipboard.
Run through the code or manually follow the same steps up to the point where
you're about to paste; in PPT, manually do a PasteSpecial and see what types are
available to paste. If there's no HTML option, that's the problem.
-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================