WriteAsEmf

Slide.WriteAsEmf method

Saves the slide content as an EMF file.

public void WriteAsEmf(Stream stream)
ParameterTypeDescription
streamStreamTarget stream

Exceptions

exceptioncondition
ArgumentNullExceptionTarget stream is null

Examples

The following code example demonstrates how to convert the first slide from a PowerPoint presentation into a metafile.

[C#]
using (Presentation pres = new Presentation("pres.pptx"))
{
    using (Stream fileStream = System.IO.File.Create("slide_1.emf"))
    {
        // Saves the first slide as a metafille
        pres.Slides[0].WriteAsEmf(fileStream);
    }
}

See Also