OLEObjects: Adding jpg Object

  • Thread starter Kate Lynne Ronquillo
  • Start date
K

Kate Lynne Ronquillo

Is there a way to add a jpg object on a cell?
I'm using Paint.Picture but the image is in bmp.

We are trying to minimize the overall size of the excel file.
We have been using word document before, but we jpg is a much smaller file.

Is there a way to add jpg object in the file.
Or maybe an application that the default extension is jpg?

I have no idea how to this, please help.
Thanks a lot!

-- Kate
 
G

Gary''s Student

From the Recorder:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 4/17/2008 by James Ravenswood
'

'
ActiveSheet.OLEObjects.Add(Filename:= _
"C:\Documents and Settings\Owner\Desktop\blacky.jpg", Link:=False, _
DisplayAsIcon:=True).Select

End Sub
 
K

Kate Lynne Ronquillo

Hi Gary,

Thanks for the help.

However,
This is my code:
ActiveSheet.OLEObjects.Add(ClassType:="Paint.Picture", Link:=False, _
DisplayAsIcon:=True, IconFileName:= _
"C:\WINDOWS\system32\shimgvw.dll", _
IconIndex:=3, IconLabel:="").Select

When a user click the Add Button, the Paint application opens.
So the user can paste the required image.
Then after closing the application, an icon appears on the selected cell.

I am not suppose to create a file.
I should embed an object into a cell on my excel file.

The problem is Paint, in default, is storing the object as a bitmap.
Which makes the overall file size bigger.

Please help.
Thanks a lot!
 
D

Dave Peterson

You may want to record a macro when you use Insert|Picture|from File
(xl2003 menus)
 
K

Kate Lynne Ronquillo

Hi Dave,

Thanks for the help.

However,
This is my code:
ActiveSheet.OLEObjects.Add(ClassType:="Paint.Picture", Link:=False, _
DisplayAsIcon:=True, IconFileName:= _
"C:\WINDOWS\system32\shimgvw.dll", _
IconIndex:=3, IconLabel:="").Select

When a user click the Add Button, the Paint application opens.
So the user can paste the required image.
Then after closing the application, an icon appears on the selected cell.

There is no existing file.
I should embed an object into a cell on my excel file.

The problem is Paint, in default, is storing the object as a bitmap.
Which makes the overall file size bigger.

Please help.
Thanks a lot!
 
D

Dave Peterson

I don't have any guesses.

Is there a newsgroup dedicated to Paint?

Maybe a search of google for paint and default file format will help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top