Table tab=tab5;
cel=tab.Cell(1,1);
InlineShapes oInline;
oInline.AttachDispatch(sSel.GetInlineShapes());
//InlineShapes shapes=sApp.GetSelection();
//COleVariant covOptional((long)DISP_E_PARAMNOTFOUND,VT_ERROR);
COleVariant varTrue(short(1),VT_BOOL);
COleVariant varFalse(short(0),VT_BOOL);
CString strFileName = GetAppPath() +"";
VARIANT vRang;
vRang.vt=VT_DISPATCH;
vRang.pdispVal=cel.GetRange();
oInline.AddPicture(strFileName,&varTrue,&varTrue,&vRang);
阅读(1896) | 评论(0) | 转发(0) |