Red X when exporting PPT slides to images (only in W2003-64)

Q

Quibix

I'm developing a web tool that interacts with PowerPoint to export the slides
to JPG images. This images are supposed to be consumed from a different
place. The problem is that some embedded elements are converted to rectangle
with a red X and a message saying "The image cannot be displayed". I have
tested the process in Windows 2003 Server 32 bits and worked fine on 3
different machines, but then, I installed it in the 64 bit version and this
happened. The first time the problem was found, we thought it was caused by
an image stored in a document created (both) with Office for Mac, but now
we're having the same issue with a clipart in Office 2007 for Windows. When
opened in interactive mode, the documents present no anomalies, and all the
pictures are fully shown. Both Office 2003 and 2007 gave me the same results
on the 64 bits version. (on the same machine)

I'm quite clueless, and my deadline is approaching. Has anyone seen this?
 
Q

Quibix

Does this happen with all images or just some?
Very few images fail. So far, two of them were very simple cliparts
depicting computers. This image is stored as a Windows Metafile. The previous
problem occurred with an image stored in a Mac format (I don't remember which
format was it). That particular image had an alpha channel, as far as I
remember, because it was a corporate logo and the shape wasn't rectangular.
Does the problem appear when you use a highly simplified version of your code?
For example, just enough code to open a presentation, export the first slide in
a presentation, close the file?
The code is quite simple, indeed. The following piece of code shows the
relevant part:

ApplicationClass app = new ApplicationClass();
Microsoft.Office.Interop.PowerPoint.Presentation presentation =
app.Presentations.Open(InName, MsoTriState.msoTrue,
MsoTriState.msoFalse, MsoTriState.msoFalse);

for (int i = 0; i < presentation.Slides.Count; ++i)
{
presentation.Slides[i + 1].Export(OutName + i + ".png", "PNG", 960, 720);
}

presentation.Close();
app.Quit();
Is this written in VBA or some other language?
If some other, can you repro the behavior by invoking Slide.Export from VBA?

It is written in C# (.NET 2.0), and I haven't tested it in a different
language yet. I could try, if this helps to pinpoint the issue.
Have you applied SP1 to Office 2007?
Yes, I have. And the OS is fully updated, too.

I hope this helps.
 
Q

Quibix

Something I forgot to mention is that the same problem occurs with Office
2003 (I mean at the server side), too, so I can't blame Office 2007.

Thanks a lot for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top