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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
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
Adding an Object to a MultiPage Brandt Excel Programming 2 November 19th 06 03:05 PM
Adding Name object to a collection does not add an object Tim Richardson Excel Programming 5 October 8th 06 01:28 PM
OLEObjects, adding a picture problem. Eric Excel Programming 1 September 12th 06 02:34 PM
Adding OLEObjects Word Doc 8 vqthomf Excel Programming 0 December 15th 05 09:30 AM


All times are GMT +1. The time now is 06:53 AM.

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"