powerpoint

How to save *.ppt, *.pptx files as *.wmv using Interop with C#?

天涯浪子 提交于 2019-12-01 11:23:38
I tried to do this with the next code: 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(); } } } But this solution created file

Simple Example of creating a PowerPoint file

早过忘川 提交于 2019-12-01 11:23:17
问题 I'm looking for some sample code on how to add an image and text & output it as a PowerPoint file. The host server does not have Office and I'm not allowed to install anything so the "Manipulating Excel 2007 and PowerPoint 2007 Files with the Open XML Format API " will not help me. Below is the code the output the PowerPoint. I just don't know of to add text and images. Response.ClearContent(); Response.AddHeader("content-disposition", "attachment;filename=Filename.ppt"); Response.ContentType

Sample create powerpoint with openxml

有些话、适合烂在心里 提交于 2019-12-01 11:07:47
Where can I find the 'Hello World' with the insert text and image in a ppt file with OpenXML? I'm not able to generate a simple template. Before going to develop a template for PowerPoint, read the presentationML structure from this PDF , Refer the follwing link for creating PPT using OPENXML. How to: Create a presentation document by providing a file name (Open XML SDK) Refer following link for insert image into the PPT Insert image into the PPT File. For Further Examples in OpenXML Refer: OPENXML Developerorg 来源: https://stackoverflow.com/questions/35409323/sample-create-powerpoint-with

How to read a PPT file in ASP.NET MVC?

烈酒焚心 提交于 2019-12-01 08:53:09
问题 I have PPT file on desktop named as "slide.ppt". I want to read all slides of this PPT file in my ReadSlide function as below public void ReadSlide(){ } How can I read all slide from a PPT file in my C# code? 回答1: Use as below public void ReadSlide(){ string filePath= @"C:\Users\UserName\Slide.pptx"; Microsoft.Office.Interop.PowerPoint.Application PowerPoint_App = new Microsoft.Office.Interop.PowerPoint.Application(); Microsoft.Office.Interop.PowerPoint.Presentations multi_presentations =

How to save *.ppt, *.pptx files as *.wmv using Interop with C#?

馋奶兔 提交于 2019-12-01 08:25:16
问题 I tried to do this with the next code: 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

Converting ppt to png using Apache poi

邮差的信 提交于 2019-12-01 08:15:40
Hello I am trying to use the Apache Poi framework to convert each slide of a ppt to an individual png. The problem is that some slides are deformed. For instance there is a slide where the background has a rainbow color to it. And Images that are on some slides do not appear at all on the .png file here is the code: FileInputStream is = new FileInputStream(args[0]); SlideShow ppt = new SlideShow(is); is.close(); Dimension pgsize = ppt.getPageSize(); Slide[] slide = ppt.getSlides(); for (int i = 0; i < slide.length; i++) { BufferedImage img = new BufferedImage(pgsize.width, pgsize.height,

Sample create powerpoint with openxml

懵懂的女人 提交于 2019-12-01 06:57:55
问题 Where can I find the 'Hello World' with the insert text and image in a ppt file with OpenXML? I'm not able to generate a simple template. 回答1: Before going to develop a template for PowerPoint, read the presentationML structure from this PDF, Refer the follwing link for creating PPT using OPENXML. How to: Create a presentation document by providing a file name (Open XML SDK) Refer following link for insert image into the PPT Insert image into the PPT File. For Further Examples in OpenXML

Converting ppt to png using Apache poi

亡梦爱人 提交于 2019-12-01 06:47:41
问题 Hello I am trying to use the Apache Poi framework to convert each slide of a ppt to an individual png. The problem is that some slides are deformed. For instance there is a slide where the background has a rainbow color to it. And Images that are on some slides do not appear at all on the .png file here is the code: FileInputStream is = new FileInputStream(args[0]); SlideShow ppt = new SlideShow(is); is.close(); Dimension pgsize = ppt.getPageSize(); Slide[] slide = ppt.getSlides(); for (int i

Call subroutine when a specific slide loads, or on a timer

ぐ巨炮叔叔 提交于 2019-12-01 06:30:36
I'm working with a PowerPoint 2003 presentation for a kiosk display, and it is left running pretty much 24/7. One slide on it has the weather, the current date, and the 7 day forecast. I've already written the subs that will update the weather from an Excel workbook, and update the dates displayed, but right now I have to manually update it when I come in. Is there a way that I can have a subroutine (e.g. UpdateSlide() ) called when the slideshow reaches that particular slide? It seems like there is no official way to do this, I'm assuming for security reasons, but what about a timed event,

How can I retrieve images from a .pptx file using MS Open XML SDK?

主宰稳场 提交于 2019-12-01 05:32:36
I started experimenting with Open XML SDK 2.0 for Microsoft Office . I'm currently able to do certain things such as retrieve all texts in each slide, and get the size of the presentation. For example, I do the latter this way: using (var doc = PresentationDocument.Open(pptx_filename, false)) { var presentation = doc.PresentationPart.Presentation; Debug.Print("width: " + (presentation.SlideSize.Cx / 9525.0).ToString()); Debug.Print("height: " + (presentation.SlideSize.Cy / 9525.0).ToString()); } Now I'd like to retrieve embedded images in a given slide. Does anyone know how to do this or can