Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / April 2008

Tip: Looking for answers? Try searching our database.

OLEObjects: Adding jpg Object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kate Lynne Ronquillo - 17 Apr 2008 07:45 GMT
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 - 17 Apr 2008 10:31 GMT
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

Signature

Gary''s Student - gsnu200779

> Is there a way to add a jpg object on a cell?
> I'm using Paint.Picture but the image is in bmp.
[quoted text clipped - 9 lines]
>
> -- Kate
Kate Lynne Ronquillo - 17 Apr 2008 10:47 GMT
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!

> From the Recorder:
>
[quoted text clipped - 24 lines]
> >
> > -- Kate
Dave Peterson - 17 Apr 2008 13:38 GMT
You may want to record a macro when you use Insert|Picture|from File
(xl2003 menus)

> Is there a way to add a jpg object on a cell?
> I'm using Paint.Picture but the image is in bmp.
[quoted text clipped - 9 lines]
>
> -- Kate

Signature

Dave Peterson

Kate Lynne Ronquillo - 18 Apr 2008 02:38 GMT
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!

> You may want to record a macro when you use Insert|Picture|from File
> (xl2003 menus)
[quoted text clipped - 12 lines]
> >
> > -- Kate
Dave Peterson - 18 Apr 2008 13:44 GMT
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.

> Hi Dave,
>
[quoted text clipped - 40 lines]
> >
> > Dave Peterson

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.