1

I'm using C++ to create a Powerpoint 2010 slide (in Windows 7). I have a picture in a .bmp file that I'd like to fill the CShape. So the code does this:

_variant_t vPicName= L"MyPicture1";
CShape picShape(slideshapes.Item(vPicName));
CString fullBitmapFilePath = "C:\MyCode\MyPicture.bmp";
CFillFormat picFill(picShape.get_Fill());
picFill.UserPicture(fullBitmapFilePath);

The shape gets drawn in the powerpoint as a green box, but it doesn't fill with the picture. This same exact code works with Office 2003 on XP. Any tips? Thank you

0 Answers0