PlayEnhMetaFile() Fails if the emf is saved from PowerPoint XP or

S

Synergy

We have an EXE application created in VC++ 6.0. We are loading EMF files
(corresponding to a PPT presentation having WMF files inserted into it) to a
HDC object using PlayEnhMetaFile() from this application. The EMF files are
generated from this EXE by PowerPoint automation using the object model
method _presentation.SaveAs(). Our problem is PlayEnhMetaFile() fails for
PowerPointXP or PowerPoint 2003 in this case.

Detailed info:
What we have done is

1) Created a 1 slide presentation
2) Insert a WMF file into it [Insert-Picture-From file].
3) Save the presentation.

Ran our EXE application.
From this EXE we save the above presentation as EMF.
Now we will get 1 EMF.

We loaded this EMF to a HDC object using PlayEnhMetaFile().

The above method worked OK for PowerPoint 2007.
But if is PowerPoint XP or PowerPoint 2003, the PlayEnhMetaFile() fails.

Why the PlayEnhMetaFile() fails for PPT XP or PPT 2003?
 
B

Bob Buckland ?:-\)

Hi Libeesh,

You may want to also post this in the MS Office Powerpoint discussion group through the link below. They tend to have more folks
who work on the dev side there than here.

=============

We have an EXE application created in VC++ 6.0. We are loading EMF files
(corresponding to a PPT presentation having WMF files inserted into it) to a
HDC object using PlayEnhMetaFile() from this application. The EMF files are
generated from this EXE by PowerPoint automation using the object model
method _presentation.SaveAs(). Our problem is PlayEnhMetaFile() fails for
PowerPointXP or PowerPoint 2003 in this case.

Detailed info:
What we have done is

1) Created a 1 slide presentation
2) Insert a WMF file into it [Insert-Picture-From file].
3) Save the presentation.

Ran our EXE application.
From this EXE we save the above presentation as EMF.
Now we will get 1 EMF.

We loaded this EMF to a HDC object using PlayEnhMetaFile().

The above method worked OK for PowerPoint 2007.
But if is PowerPoint XP or PowerPoint 2003, the PlayEnhMetaFile() fails.

Why the PlayEnhMetaFile() fails for PPT XP or PPT 2003?

--
Libeesh>>
--
Please let us know if this has helped,

Bob Buckland ?:)
MS Office System Products MVP

LINKS
A. Specific newsgroup/discussion group mentioned in this message:
news://msnews.microsoft.com/microsoft.public.powerpoint
or via browser:
http://microsoft.com/communities/newsgroups/en-us/?dg=microsoft.public.powerpoint

B. MS Office Community discussion/newsgroups via Web Browser
http://microsoft.com/office/community/en-us/default.mspx
or
Microsoft hosted newsgroups via Outlook Express/newsreader
news://msnews.microsoft.com
 

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