ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   OLEObjects: Adding jpg Object (https://www.excelbanter.com/excel-programming/409504-oleobjects-adding-jpg-object.html)

Kate Lynne Ronquillo

OLEObjects: Adding jpg Object
 
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

Gary''s Student

OLEObjects: Adding jpg Object
 
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

--
Gary''s Student - gsnu200779


"Kate Lynne Ronquillo" wrote:

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


Kate Lynne Ronquillo

OLEObjects: Adding jpg Object
 
Hi Gary,

Thanks for the help.

However,
This is my code:
ActiveSheet.OLEObjects.Add(ClassType:="Paint.Pictu re", 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!

"Gary''s Student" wrote:

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

--
Gary''s Student - gsnu200779


"Kate Lynne Ronquillo" wrote:

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


Dave Peterson

OLEObjects: Adding jpg Object
 
You may want to record a macro when you use Insert|Picture|from File
(xl2003 menus)

Kate Lynne Ronquillo wrote:

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


--

Dave Peterson

Kate Lynne Ronquillo

OLEObjects: Adding jpg Object
 
Hi Dave,

Thanks for the help.

However,
This is my code:
ActiveSheet.OLEObjects.Add(ClassType:="Paint.Pictu re", 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!


"Dave Peterson" wrote:

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

Kate Lynne Ronquillo wrote:

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


--

Dave Peterson


Dave Peterson

OLEObjects: Adding jpg Object
 
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.

Kate Lynne Ronquillo wrote:

Hi Dave,

Thanks for the help.

However,
This is my code:
ActiveSheet.OLEObjects.Add(ClassType:="Paint.Pictu re", 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!

"Dave Peterson" wrote:

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

Kate Lynne Ronquillo wrote:

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


--

Dave Peterson


--

Dave Peterson


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com