Re: Accessing a picture within an OLE object
- From: "Jon Stoackley" <JonStoackley@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 22 Sep 2005 12:25:30 -0700
Alexander,
Thanks for the quick reply.
I'm trying to follow your reply - I think that I see where you're going. By
QI you mean Query Interface on the OLE object to get the IDataObject
interface. From there I can use the GetData method of the IDataObject
interface to return the actual data associated with the object. So far so
good?
Thanks for the tip about the book, however the speed with which my Employer
could purchase this book leaves a lot to be desired....
I neglected to make it clear that I am writing a VBA macro. I don't seem to
be able to declare objects of the DataObject class. Is there a reference that
I need to setup?
Thanks,
Jon.
"Alexander Nickolov" wrote:
> You can try to QI the object for IDataObject. That's what
> gets placed on the clipboard during an OLE copy operation.
> I suggest you read chapters 10-13 of "Inside OLE" for more
> in-depth coverage of OLE's Universal Data Transfer.
>
> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD
> email: agnickolov@xxxxxxxx
> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================
>
> "Jon Stoackley" <JonStoackley@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:A0044980-DAA5-4D83-879B-9AD65FE8EF93@xxxxxxxxxxxxxxxx
> > Hi,
> >
> > I have a task which requires me to gain access to the pixel data of a
> > picture which is embedded into an Excel spread***.
> >
> > I essentially need to modify the colours used within the picture.
> >
> > In the Excel *** I can gain access to the object with the shapes
> > collection, and I can get access to the OLE object with the OLEFormat
> > object.
> > This does not however allow me access to the picture itself.
> >
> > I know the picture is stored within the ***. I can copy it and paste it
> > into Paint to convert it into a BMP, but I need to work on it
> > programatically.
> >
> > I guess I need to use whatever functions the clipboard is using in order
> > to
> > convert it into a bitmap for the Paint application.
> >
> > Any thoughts on this?
> >
> > (Yes it would be very easy to do it manually!)
> >
> > Thanks,
> >
> > Jon.
>
>
>
.
- Follow-Ups:
- Re: Accessing a picture within an OLE object
- From: Alexander Nickolov
- Re: Accessing a picture within an OLE object
- References:
- Re: Accessing a picture within an OLE object
- From: Alexander Nickolov
- Re: Accessing a picture within an OLE object
- Prev by Date: Re: Accessing a picture within an OLE object
- Next by Date: PeekMessage() inside a COM function causes weird reentrancy problems
- Previous by thread: Re: Accessing a picture within an OLE object
- Next by thread: Re: Accessing a picture within an OLE object
- Index(es):