VBA: shape.Export not exporting pictures properly

  • Thread starter Thread starter Patrick Bristow
  • Start date Start date
P

Patrick Bristow

I'm writing some automation for PowerPoint to export it
into a different file format (XAML for Longhorn,
actually). However, many of the shapes I'm trying to
call Export on are coming out in B&W (they're full color
images). In fact, I cut & pasted one of the images into
Paint and got a B&W image there too. Has anyone seen
this and/or know how to fix it?

thanks,
-pb
 
This may sound a little weird, but do you have a color printer driver loaded
on the computer? Is the print-out dialog box defaulting to black and white
printing?

B
===============
Please spend a few minutes checking out www.pptfaq.com This link will
answer most of our questions, before you think to ask them.

Change org to com to defuse anti-spam, ant-virus, anti-nuisance
misdirection.
 
Yeah, that might sound a little weird :)

Yes, I have a color printer driver loaded. No, it's
neither the default printer nor is its default settings
set to B&W. However, my default printer is a B&W
printer. Did you actually have this affect PPT before?

Thx.
 
I have. Try making the color printer your default and see what happens.
(PowerPoint is dependent on your printer for things you wouldn't expect,
like font selection and even if it will run. It wouldn't surprise me if it
affects this too.)

--
Kathryn Jacobs, Microsoft PPT MVP
If this helped you, please take the time to rate the value of this post:
http://rate.affero.net/jacobskl/
Get PowerPoint answers at http://www.powerpointanswers.com
Cook anything outdoors with http://www.outdoorcook.com
Kathy is a trainer, writer, Girl Scout, and whatever else there is time for
I believe life is meant to be lived. But:
if we live without making a difference, it makes no difference that we lived
 
No PPT lovin' even with the color printer set as
default. I dumped the powerpnt.exe process & made sure
the printer defaul took effect by opening the Print
dialog.

Any more thoughts?
Thx.
 
You may try to set the output via VBA macro.

Place a command button on the slide and try this macro.

See if this does the trick.
=====================
Private Sub CommandButton1_Click()

'Print all slides in color
With Application.ActivePresentation
With .PrintOptions
.PrintHiddenSlides = True
.NumberOfCopies = 1
.PrintColorType = ppPrintColor
.OutputType = ppPrintOutputSlides
.RangeType = ppPrintAll
End With
.PrintOut
End With
End Sub
======================

B
===============
Please spend a few minutes checking out www.pptfaq.com This link will
answer most of our questions, before you think to ask them.

Change org to com to defuse anti-spam, ant-virus, anti-nuisance
misdirection.
 
Sorry, I should have said this before we went down this
road: Tuesday morning I had a slide that was producing
full color images (but only in WMF or EMF export
format). Late Tuesday I replaced the slide by copy &
pasting the original from a different presentation (into
my test slide deck). I didn't change anything on my
comptuer that I'm aware of, and I didn't so much as print
a document. I'm pretty sure my printer has nothing to do
with this.

Thanks.
 
I understand. But, in many cases, the installed printer drivers are used by
PowerPoint in rendering print, pictures, and other visuals. While it
doesn't seem to be related to non-printing issues, it often is. But, its
ok, we'll walk down another path.

If the problem has only surfaced since cut/pasting the image from another
source, then has the other source also been effected similarly? Did you
save the image to the hd before inserting it into PowerPoint (this is the
preferred method)?

It is possible that the images are using non-standard color depths and the
computer (being unable to handle the setting just gives up in frustration)
just nulls the colors altogether. Try pasting the image into a graphics
editing program, then save as a different filename and format (this should
standardize then picture's color depth). Then insert the pict back into
PowerPoint and see if it can export better.


B
 
Back
Top