powerpoint

Extracting images from pptx with apache poi

有些话、适合烂在心里 提交于 2019-11-28 14:29:57
I'm trying to extract slides from a ppt file with Apache POI, there is no problem in that, but now I intend to open pptx files and do the same, does anyone knows how to?? this is the code to extract images from ppt files: public ImageIcon display() throws JPresentationException { Background background; background = slides[current].getBackground(); Fill f = background.getFill(); Color color = f.getForegroundColor(); Dimension dimension = ppt.getPageSize(); shapes = slides[current].getShapes(); BufferedImage img = new BufferedImage(dimension.width, dimension.height, BufferedImage.TYPE_INT_RGB);

Get shape by Id or Name

三世轮回 提交于 2019-11-28 13:43:05
Is there any way to get a shape if you know its Id ? For example: Dim myshape As Shape myshape.Id = 42 myshape = getShapeById(myshape.Id) Or, alternatively, could I get the shape by Name ? Dim myshape As Shape myshape.Name = "Rectangle 42" myshape = getShapeByName(myshape.Name) Todd Main Getting a shape .Name by its .Id is somewhat more convoluted than getting its .Id by its .Name . But here's how it's done: Sub PrintShapeName() Debug.Print getNameByID(3, 1) End Sub Function getNameByID(shapeID As Long, slide As Integer) Dim ap As Presentation: Set ap = ActivePresentation Dim sl As slide: Set

Extracting all text from a powerpoint file in VBA

江枫思渺然 提交于 2019-11-28 12:27:34
I have a huge set of powerpoint files from which I want to extract all the text and just lump it all into one big text file. Each source (PPT) file has multiple pages (slides). I do not care about formatting - only the words. I could do this manually with a file by just ^A ^C in PPT, followed by ^V in notepad; then page down in the PPT, and repeat for each slide in the powerpoint. (Too bad I can't just do a ^A that would grab EVERYTHING ... then I could use sendkey to copy / paste) But there are many hundreds of these PPTs with different numbers of slides. It seems like this would be a common

Get slide index or visibility state of PowerPoint content addin (Office.js)

[亡魂溺海] 提交于 2019-11-28 10:05:20
问题 I'm writing a PowerPoint content addin using Office.js API. I need a way for each instance of that addin to determine the index of the containing slide, or, if this is impossible, the visibility state of the addin (i.e. whether the containing slide is currently visible on screen). The documentation suggests no API specifically intended for this purpose, so I've been using the following method: Upon addin initialization (inside Document.initialize callback), request currently selected slide

In a dual-monitor system, finding out on which monitor a PowerPoint slideshow is displayed

坚强是说给别人听的谎言 提交于 2019-11-28 09:45:16
问题 In Powerpoint 2007/2010 run on a multiple monitor system, we can select the monitor on which the slideshow will be shown by going to "Slide Show"-> "Set up slideShow" -> "Display SlideShow on" and selecting the desired monitor. Is it possible to programmatically determine these settings (e.g. using VBA)? What I actually need is the pixel-resolution of the monitor on which the slideshow is shown. How can I do that? 回答1: Try this: With SlideShowWindows(1) Debug.Print .Height Debug.Print .Width

How to update excel embedded charts in powerpoint?

给你一囗甜甜゛ 提交于 2019-11-28 09:24:28
I have 30 charts that were created from excel and were pasted onto powerpoint slides. Every month, I have to update these 30 embedded charts by manually clicking on the charts and edit. I am aware there is an option to use paste special, so that the data in the charts can be updated automatically by clicking the update links. However, my charts needs to be edited by some users. Paste special option does not allow users to edit the charts. Hence, I am unable to use this paste special option. I think the solution lies in writing a vba in powerpoint. Can any expert here offer to write this vba

Application.Quit() method failing to clear process

老子叫甜甜 提交于 2019-11-28 07:15:34
问题 I've seen a lot of posts returned from a Google search about this, but none of the solutions referenced in them clear this up for me. So, I thought I'd try myself. After this block of code: PowerPoint.Application powerPoint = new Microsoft.Office.Interop.PowerPoint.Application(); powerPoint.Visible = Office.MsoTriState.msoTrue; Microsoft.Office.Interop.PowerPoint.Presentation ppt = null;enter code here I can issue the ppt.Quit(); command and Powerpoint will close and no Process is left

Controlling PowerPoint Slideshow

天涯浪子 提交于 2019-11-28 06:06:44
When a slideshow running in PowerPoint I want to control the movement (Next and Previous) of the slides. Of course it is possible with the > and < button on the keyboard, but is there any way in which I can have a custom application listening to the Next and Previous controls? My custom application has nothing but 2 buttons, next and previous, when I click either, the button's event handler should pass the control to the PowerPoint application running the slideshow. And thus, PowerPoint will move the slideshow back or forward? Somewhat similar to the way remote, wireless PowerPoint Presenters

How to name an object within a PowerPoint slide?

我怕爱的太早我们不能终老 提交于 2019-11-28 05:15:12
So I know how to name a textbox, or a like object in PowerPoint with VB, but I was wondering if there was a way to name objects through the Ribbon (PowerPoint 2007). For instance, if I add a text box onto a slide, is there a way to assign it a name (sort of like the properties window in access, or the textbox in Excel 2003 at the top left side where you can enter the name)? Basically so I can reference it in code later; without having to use code to name each and every object i add after the fact. Perhaps an easier way through the Ribbon? Todd Main Yes. Click on the object (textbox, shape, etc

Creating Professional Looking Powerpoints in R

a 夏天 提交于 2019-11-28 04:46:11
Is there a good way to use data from R and a package like ReporteRs to generate complete Powerpoints? I have about 900 slides to create. Our analysts currently follow this path: DB --> SAS --> CSV --> PPTX (embedded graphics) (x900 times) This is manual, open to lots of errors and slow. Ideally, I would prefer: DB --> R + ReporteRs --> PPTX (x1 time) The issue is 2-fold. First, our clients (unreasonably) prefer PPTX over a web or even PDF format. Second, R graphics cannot be edited in PPTX, and are sometimes not ideally sized/formatted, especially in terms of axis text sizes. So is there a way