Re: How do I determine the image file used for a fill in code?

Tech-Archive recommends: Fix windows errors by optimizing your registry



You are out of luck there. This is something which was surprisingly left out
from the object model. Though you cannot determine which file was used, you
can extract the original image from with PowerPoint (2000+) by using the
hidden Export method for a shape.

Interestingly, when you use the Export method on the shape with a user
background picture/texture fill (Same as right-click on shape| Saves as
picture...) to export it as *EMF*, you get the original image that was used
to provide the background fill and not an export of the complete shape. Any
other format and you will get the PowerPoint shape. A bug which can be used
to your benefit.

Call ActiveWindow.Selection.ShapeRange(1).Export("E:\test\test.emf",
ppShapeFormatEMF)

--
Regards,
Shyam Pillai

Animation Carbon: http://skp.mvps.org/ac/




"MrBo" <MrBo@xxxxxxxxxx> wrote in message
news:e9YFc3ndFHA.3808@xxxxxxxxxxxxxxxxxxxxxxx
> I'm aware of that, however I'm trying to do this programmatically in VBA!
>
> "Geetesh Bajaj" <geeteshREMOVECAPS@xxxxxxxxxxx> wrote in message
> news:ObStnXndFHA.2688@xxxxxxxxxxxxxxxxxxxxxxx
>> If you just want the name, double-click the AutoShape to summon the
>> Format
>> AutoShape dialog box.
>>
>> Then choose the Colors and Lines tab and click the downward pointing
>> arrow
>> for the Fill Color and choose Fill Effects in the flyout menu.
>>
>> Then choose the Picture tab in the Fill Effects dialog box. Right below
> the
>> picture, you'll find the name of the picture.
>>
>> --
>> Geetesh Bajaj, Microsoft PowerPoint MVP
>> http://www.indezine.com
>> http://www.ppted.com
>>
>>
>>
>> "MrBo" <MrBo@xxxxxxxxxx> wrote in message
>> news:O5VkYimdFHA.2212@xxxxxxxxxxxxxxxxxxxxxxx
>> > All
>> > I'm trying to programmatically determine which image file is currently
>> being
>> > used to fill an autoshape.
>> > I can set this file for an autoshape but so far have been unable to
>> > read
>> > this filename in code.
>> > Any help gratefully appreciated.
>> >
>> > Menu:-
>> > Select autoshape, right click-Format Autoshape-Colors and Lines
>> > tab-Fill-Color:-Fill Effects-Picture Tab-Select Picture
>> >
>> >
>> >
>>
>>
>>
>
>


.



Relevant Pages

  • Re: background fills
    ... The only way I'm aware that we can create a background fill in an autoshape ... is via the Format Autoshape dialog. ... Are you using a picture for the ... Microsoft Most Valuable Professional (MVP PowerPoint) ...
    (microsoft.public.powerpoint)
  • Re: How do I determine the image file used for a fill in code?
    ... but I think that unless you use code to put the picture ... Microsoft PowerPoint MVP ... Director of Graduate Programs in Educational Technology ... > being used to fill an autoshape. ...
    (microsoft.public.powerpoint)
  • Re: Replacing embedded images... or switching embedded to linked...
    ... Tom, start with a rectangle AutoShape and impart it a picture fill - then do ... Geetesh Bajaj, Microsoft PowerPoint MVP ...
    (microsoft.public.powerpoint)
  • Re: picturebox1.image into a slide
    ... PowerShow - View multiple PowerPoint slide shows simultaneously ... windows application, it has one windows forms,it contains one picture box ... picturbox1.image.Save,then the original image is overwritted.I want both ...
    (microsoft.public.powerpoint)
  • Re: Where is the original picture located?
    ... picture, then the path to the original image will always be there. ... MS MVP - PowerPoint ... > When I have inserted a picture into a PowerPoint presentation,> sometimes ...
    (microsoft.public.powerpoint)