Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code to Insert a picture using VC++
dont know 'bout vc++ but in VBA it goes like this:
I've fully declared the types to avoid confusion, the picture object comes in many libraries.. and in many shapes... Sub Test() Dim wks As Excel.Worksheet Dim pic As Excel.Picture Dim shp As Excel.Shape Set wks = ActiveSheet Set pic = wks.Pictures.Insert("C:\logo.gif") Set shp = pic.ShapeRange(1) End Sub keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool ?B?QmluIEsu?= wrote: Hi All, Anybody know how to include a picture in an excel sheet using VC++. I can use AddPicture but it seems not supported by EXCEL 2003 object model. Also, is there any way to insert the picture without explicitly specifying the size of the picture? Thanks in advance, Bin |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code to Insert a picture using VC++
Hi keepitcool,
Thanks for the reply but that didn't work for me because I'm looking specific to VC++. Regds, Bin ----- keepitcool wrote: ----- dont know 'bout vc++ but in VBA it goes like this: I've fully declared the types to avoid confusion, the picture object comes in many libraries.. and in many shapes... Sub Test() Dim wks As Excel.Worksheet Dim pic As Excel.Picture Dim shp As Excel.Shape Set wks = ActiveSheet Set pic = wks.Pictures.Insert("C:\logo.gif") Set shp = pic.ShapeRange(1) End Sub keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool ?B?QmluIEsu?= wrote: Hi All, Anybody know how to include a picture in an excel sheet using VC++. I can use AddPicture but it seems not supported by EXCEL 2003 object model. Also, is there any way to insert the picture without explicitly specifying the size of the picture? Thanks in advance, Bin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert Picture | New Users to Excel | |||
how do I insert picture into cell so vlookup can return picture? | Excel Worksheet Functions | |||
insert a picture in to a comment but picture not save on hard disk | Excel Discussion (Misc queries) | |||
Insert Picture | Excel Worksheet Functions | |||
insert picture | Excel Programming |