View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bin K. Bin K. is offline
external usenet poster
 
Posts: 1
Default 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