Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Picture I think I need to rephrase the question New Users to Excel 6 October 24th 07 07:08 AM
how do I insert picture into cell so vlookup can return picture? ah Excel Worksheet Functions 1 May 1st 07 04:38 AM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
Insert Picture Jerry Stone Excel Worksheet Functions 0 June 14th 06 10:39 PM
insert picture chad Excel Programming 1 May 13th 04 01:35 AM


All times are GMT +1. The time now is 09:54 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"