Pasting images to Excel OLE server
Hi folks,
I have a problem where I can't found decent documentation for anywhere:
I accessed the Excel Ole server from a MFC program and now I want to put a bitmap into a cell of a worksheet; I already have a pointer Range pointer to this cell.
How is this done??
I know there's the Range.PasteSpecial() function, but what do I have to put into it?
(MSDN library is really a mess for this topic).
Help would really be welcomed..
Regards,
Matthias.
Tried it, but I get an exception
Dear Tom,
Thanks for your reply.
However, I tried it that way, but I get an runtime exception when calling the sheet.Paste() method, which states the Paste method to be invalid.
Nevertheless, the bitmap is in the clipboard before calling Paste(): I tried to paste it externally (manually) into Excel , and that worked.
Is there something I have to consider when setting the parameters for the Paste method??
Regards,
Matthias (out of his depth)
Three hoorays for Tom Frohman!
Dear Tom,
You are a wizard: the (first) solution worked!!
Gonna put up a golden Tom statue in front of our building :-)
Mille grazie,
Matthias
p.s. the COleVariant covOptional wasn't that intuitive, was it? How did you know?
p.p.s. just for the sake of being complete: the PasteSpecial() is still throwing the exception...:-(