¿Cómo guardar archivos * .ppt, * .pptx como * .wmv utilizando Interop con C #?
Intenté hacer esto con el siguiente código:
using Microsoft.Office.Core;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
using System.IO;
using Microsoft.Office.Interop.PowerPoint;
namespace SavePPT
{
class Program
{
static void Main(string[] args)
{
Application app = new PowerPoint.Application();
var pres = app.Presentations;
var file = pres.Open(@"C:\Presentation1.pptx", MsoTriState.msoTrue, MsoTriState.msoTrue, MsoTriState.msoFalse);
file.SaveCopyAs(@"C:\presentation1.wmv", PowerPoint.PpSaveAsFileType.ppSaveAsWMV, MsoTriState.msoCTrue);
app.Quit();
}
}
}
Pero esta solución creó un archivo con un tamaño de 0 KB y, por supuesto, no puedo reproducirlo.