FAQ Database Discussion Community


Pre-populate palette colors in Microsoft Office?

excel,vba,ms-office,powerpoint,office-interop
My coworkers have very specific colors they use in their Excel and PowerPoint documents, and they came to me hoping for some automation. They often have to go through the annoying task for every new document of re-picking the same three colors off the color selector. They have to select...

How to add values to a PPTX using open XML SDK C#?

c#,sql,.net,powerpoint,openxml
Here is my requirement: I have a PPTX template with me. I used OPEN XML SDK's reflect code option to obtain the c# code. Now my requirement is to add values to the template from a SQL Server Database. It would be great if you can help me out with...

How to replace text in Powerpoint file with Java

java,powerpoint,docx4j
I have a requirement where I need to replace some text in a Powerpoint File at runtime. (Powerpoint file is being used as a template with some placeholders/tokes e.g. {{USER_NAME}}) I have tried using POI but with no luck. I referred to the other links on the forum and started...

R ReporteRs: Editing Existing Slides

r,powerpoint,reporters
I have a presentation in pptx format that I need to update frequently with graphs that I generate with an R script. I would like to automate the replacement of the graphs without having to copy and paste between screens a whole bunch of times. I have been playing with...

Suppress warning dialog when updating chart links in PowerPoint

vba,powerpoint,powerpoint-vba
I'm working on a macro to automatically update all of the linked charts in a presentation from their source Excel workbooks. My problem is that when the linked workbook cannot be found, executing the LinkFormat.Update method produces the standard "The linked file is not available...." dialog. This could result in...

save pptx as pdf through excel

vba,pdf,powerpoint,save-as
I am trying to convert all pptx files in a give path to pdf files. my code: Sub pptxtopdf() Dim ppt As Object Dim objFSO As Object Dim objFolder As Object Dim objFile As Object Dim i As Integer On Error Resume Next Set ppt = GetObject(, "PowerPoint.Application") If ppt...

how to do speech recognition for windows power-point

c#,powerpoint,speech-recognition
I am undergraduate student and my third year computer mini project is the artificial intelligence. I am going to control windows power-point presentation using voice commands so here is the things i want. windows power point slideshow should be in full screen when i say "full screen" and it should...

Changing font for part of text in python-pptx

python,powerpoint
I'm using the python-pptx module to create presentations. How can I change the font properties only for a part of the text? I currently change the font like this: # first create text for shape ft = pres.slides[0].shapes[0].text_frame ft.clear() p = ft.paragraphs[0] run = p.add_run() run.text = "text" # change...

Pasting cell range from MS Excel into MS PowerPoint using VBA

excel,vba,excel-vba,powerpoint,powerpoint-vba
I'm using below code to paste cell range in Excel as image into PowerPoint. xlApp.Worksheets(5).Range("B2:D9").Copy Set shp1 = ActivePresentation.Slides(4).Shapes.PasteSpecial(ppPasteEnhancedMetafile)(1) With shp1 ' Set position: .Left = 22 .Top = 95 ' Set size: .Height = 250 .Width = 280 End With But image is not being pasted as of defined...

On Error Resume Next Not Working

vba,powerpoint,powerpoint-vba
So I have created a rather large macro which creates powerpoint presentations for my company. I would like to be able to run it for 2 different regions using: For each sRegion MyMacro(sRegion) Next There are some lines I would like to skip. For the first run MyMacro works perfectly...

Excel VBA won't open PPT files on network drive

excel,excel-vba,powerpoint
I have a very old VBA file that was created by someone else with limited comments to explain it. The file is a training file that asks for names, and then supplies the file names you can view to train in. Variables are passed around from 5 different subroutines. RetVal...

Powerpoint to Text C# - Microsoft.Interop

c#,text,powerpoint,office-interop,file-conversion
I have been trying to read .ppt files from last 3 days. I searched a lot on internet and I came up with different source code snippets but nothing was perfect. And now i tried this code, and it is not printing "Check4" because of some unidentified problem in "Foreach"...

Errors downloading Powerpoint and PDF files after nginx update

pdf,nginx,download,gzip,powerpoint
I am hosting my site on an nginx server at DigitalOcean & ran some updates. Before the updates, I was able to upload PDF and Powerpoint files to the server and download them without problems. Now, whenever I try to download a file I recieve an error "Powerpoint found a...

How to replace DataXML from Slide Diagram in Powerpoint using Apache POI

java,xml,apache,powerpoint,openxml
i want to replace the one data.xml file of power point presentation in java using apache API with other file data.xml For the reference i want to replace the following file with another power point file. Following is the code i have tried but xml isnt replacing. I have different...

How to Generate DataXML in OpenXML for powerpoint in java

java,xml,apache-poi,powerpoint,openxml
I have added one smart art shape in the Microsoft power point presentation slide. I have retrieved the data of that diagram in Java using apache POI. I want to generate my Own DataXML for that presentation from scratch using apache poi or any other free java API. How i...

Powerpoint - Bind character-size formatting of side-by-side placeholders to each other

formatting,powerpoint,placeholder,powerpoint-2010
Often, I run into the problem that I have to create slides with two text placeholders (two column-layout, side-by-side). When my text overruns the "capacity" of a placeholder, the text gets automatically resized in that specific placeholder. My problem is: The text in the other placeholder does not get resized...

How can I export a query result from MySQL to PowerPoint through my Java aplication? [closed]

java,mysql,crystal-reports,powerpoint
I have built a GUI in Java so that the users from my office can search through our database, and the users need to be able to print reports in PowerPoint slides (one slide per register of the database), is there a good library I can use to make the...

Concatenate hyperlink in Powerpoint VBA

vba,powerpoint,powerpoint-vba,powerpoint-2013
I am trying to concatenate a URL with many different parts(variables) added to the end of the URL. I have a button and when you click the button it will takes you to the a specific site using the slide index of the current slide. When the button is click...

How do I resolve a false “spreadsheet locked for editing” issue?

excel,vba,excel-vba,powerpoint,powerpoint-vba
Using the Office 2010 suite, I have a PowerPoint presentation where all the charts are linked to an Excel workbook. In order to move the presentation and/or workbook to another directory, all the links must be updated to point to the new workbook location. To do so, I've written the...

Turn off screenupdating for Powerpoint

excel,vba,export,powerpoint
I am writing a script that loops through a folder and creates graphs from some criteria, and then exports these to powerpoint. At the moment, creating 130 graphs takes 290 seconds, of which 286 are used by powerpoint. I suspect a major reason for this is not being able to...

VBA for updating Powerpoint Links

vba,powerpoint
I've got some vba code to update links in powerpoint. For some of the links it works perfectly and for some it just does not want to update. I did notice that the links update if it is an excel worksheet but if the link is a chart in excel...

Powerpoint VBA Harvey Balls

vba,powerpoint,powerpoint-vba
I'm trying to create some Harvey balls from VBA code in PowerPoint 2010+. For this, I'm inserting a circle shape and a pie one and combine them. Everything works fine if I'm inserting the two shapes from the ribbon and then align and combine them, but when I'm inserting the...

Powerpoint vba: Apply shape object properties to selection

vba,powerpoint,powerpoint-vba
I want to run a macro that allows for the following steps: User clicks on shape A and runs macro Macro will record position and size properties of shape A User clicks on Shape B on a different slide Macro applies position and size properties of shape A to shape...

Selecting a linked excel chart in powerpoint

vba,charts,powerpoint,paste
I have a powerpoint presentation with 100 slides and most of them have linked excel charts. I am trying to run a macro that will cycle through the slides and then the shapes on the slides and find the linked chart/graph, copy it, and paste it into the same position...

Is there any unique ID associated with each Powerpoint presentation file (.ppt or .pptx)?

ms-office,powerpoint,powerpoint-vba
I have checked MSDN and there seems to be no unique ID (UUID or whatnot) property in the Presentation object model ( https://msdn.microsoft.com/EN-US/library/office/ff746640(v=office.15).aspx ) According to the code example, a Presentation can only be identified by a name only. e.g. Presentations("Sample Presentation").Slides.Add 1, 1 Is there anyway I can identify...

AddTextBox in PowerPoint

powerpoint,shape
Assuming slideShape is a reference to a Shapes object, to create a text box in a PPT slide, I can use the following code: slideShape.AddTextBox(Orientation, left, top, width, height) slideShape.AddTextBox.Text = 'ABC-123 Feb 2015 Mike Smith' So far so good. But if I want to break the text in 3...

Can python-pptx module insert video?

python,video,powerpoint
according to the documentation, python-pptx can insert videos, however, the documentation does not give very good examples. Anybody have any code snippets to add video1.avi to my pptx? from pptx import Presentation pptx1 = Presentation() slide = pptx1.slides.add_slide(blank_slide_layout) not sure what inputs I need slide.placeholders.element.add_placeholder(id_,name,ph_type, orient, sz,idx) thanks...

Excel - Pulling data from one cell within a list

excel,powerpoint,spreadsheet
I use PowerPoint as a graphics template to type up football player names and there squad numbers. It can be a long procedure and so far following YouTube tutorials i have managed to create a form in Excel which can update the text boxes in PowerPoint at the click of...

create a copy of template presentation “.potx” to a new “.pptx” using openXML

c#,powerpoint,openxml-sdk
I have a powerpoint template with .potx extension, i need to create a copy of the template file, but the created file does not have any content present in it, it is a blank presentation, below is the function i am using to create a destination file using template file....

VBA Crashing when pasting into Powerpoint

excel,vba,excel-vba,powerpoint
I have made a macro which creates some graphs in excel and then opens powerpoint and pastes them into a template. Over the past couple of weeks and it has been working completely fine but after adding some things into the macro (which are completely separate things like refreshing data...

Batch convert powerpoint slideshows to kiosk

batch-file,cmd,powerpoint,bulk,powerpoint-2010
So I have around 1000 powerpoint slideshows (*.pps) that run in Speaker mode which we use as documentation. I want to prohibit the user to scroll forwards and backwards manually and only close the slideshow with the ESC key. This is where kiosk mode fits perfectly. So I need to...

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

c#,asp.net,asp.net-mvc-4,powerpoint
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?...

How to create a circle using GeneralPath and apache POI

java,awt,apache-poi,powerpoint
How to create a circle using GeneralPath and apache POI. I want create any circle in a MS PowerPoint Slide. I user appache POI in Java program. String exportFile = "pptx/export.pptx"; XSLFSlide[] slides = ppt.getSlides(); XSLFSlide slide = slides[0]; int x=300; int y=400; int R=50; java.awt.geom.GeneralPath circle = new java.awt.geom.GeneralPath();...

powerpoint, vba, generate a random number from a specific set

vba,powerpoint
VBA - how can i generate a random number within the specific set 3,5,7,9,11,13. these numbers represent slide numbers (destinations) which the user will be taken to when a button is clicked.

Replace existing image in MS PowerPoint with a new image using VBA

excel,vba,excel-vba,powerpoint
I'm updating my MS PowerPoint by pasting images on different slides using VBA. Rest of the code is working fine. What I'm unable to do is delete the existing image on all the slides and paste the new image. Currently it paste the new image on top of old image,...

in VBA powerpoint How to add a new slide to an empty presentation

vba,powerpoint,powerpoint-vba
I want to add a new slide to an empty presentation. I am struggling with the layout. I am Using the following: Set pptLayout = ActivePresentation.Designs(1).SlideMaster.CustomLayouts(1) Set sld = ActivePresentation.Slides.AddSlide(1, pptLayout) sld.Design = ActivePresentation.Designs(1) This code works fine when i already have a slide in my presentation, but i don't!...

progress through powerpoint with macros not working on second slide

vba,macros,powerpoint
I'm trying to create a macro which will run through slides in a powerpoint presentation. Should be fairly simple, and I had it working, but now it has stopped and I don't know why. The vbscript to run through the slides and animation are Private Sub PPTEvent_SlideShowNextBuild(ByVal Wn As SlideShowWindow)...

Excel macro to save pptx as pdf; error with code

excel,excel-vba,pdf,powerpoint
Good evening stackoverflow community, I know that this question probably was asked x1000 times, but i've been struggling for the past 3 hours to covert pptx to pdf via excel vba (this is required for my report generator, and in order to keep layout clean ad tidy i've decided to...

How to access an Office IEnumerable interface?

c#,ms-word,powerpoint,office-interop,word-interop
I am trying to write a C# add-in for PowerPoint with VS2013. But (after some years of absence in programming :) I am struggling with C#. Task is to let the user choose one installed proofing language and set it for all slides. First, it seems that PowerPoint doesn't have...

How to manipulate PPT with NPOI for .NET?

c#,.net,powerpoint,npoi
I made a lot of researchs about how to manipulate PPT with NPOI dll for .NET, but the examples are only to manipulate XLS files. Someone knows how to do it for PPT? In fact, what i need exactly is to upload a ppt file, and save each slide of...

Extract powerpoint titles with C#

c#,powerpoint,office-interop
I have powerponint 97-2003 files(.ppt extension) and I need to extract slide titles programatically using C#. I have tried using Microsoft.Office.Interop but without success. I have search with google and as a maximum I have found how to obtain reference to PowerPoint.Slide: using System; using System.Collections.Generic; using System.Linq; using System.Text;...

Reading Powerpoint SmartArt in Java

apache-poi,powerpoint,openxml
I found Apache POI doesn't support reading SmartArt component. (Am I right?) So I tried Aspose.Slides and it worked. But the trial version has critical restriction. (can't get text has length over 5 characters) Can anybody help?...

Export tables from a powerpoint file to an excel file

excel,powerpoint
I have a powerpoint file with lots of tables. The tables are with same columns. How can I export these tables to one excel file automatically?

Error: The specified value is out of range in C# power point

c#,vsto,powerpoint
I am trying to calibrify the text in entire presentation but if i have some ppt that is already designed my first slide consists of almost 37 shapees . so when i calibrify some shapen it gives an error saying " the specified value is out of range" Below is...

Embedding Pdf with OpenXml in PowerPoint fails for newer versions

c#,pdf,powerpoint,openxml,ole
I need to progammatically embed Pdf documents in PowerPoint via OpenXml. According to this: Embedding files into Open XML documents using C# it is possible via OLE32.StgCreateStorageEx methods to create the necessary picture as well as the oleobject. Unfortunately this doesn't work with current versions of PDF. On a 64...

How to get DataXML from Slide Diagram in Powerpoint using Apache POI

java,xml,apache-poi,powerpoint,openxml
I have added one smart art shape in the Microsoft power point presentation slide. I want to get the data of that diagram in Java using apache POI. How to retrieve the complete data.xml from first slide of presentation. I opened the presentation and following is the hierarchy of presentation....

How to read Math Equations from Powerpoint and write it to Word document in C#

c#,math,ms-office,powerpoint,office-interop
I am developing a PowerPoint extraction tool since march 2014 which extracts the words or paragraphs from PowerPoint and write it to word document. It has been developed. During the testing. we found that Math Equation has not being fetched from PowerPoint slide. I am using Microsoft.Office.Interop.Powerpoint.dll library. i am...

Is it possible to extract slides from powerpoint and save them as images using node.js?

javascript,node.js,powerpoint,sails.js
We are curently developing an app, which runs on sailsjs (node + mongo) as a backend. Our clinet wishes to have a specific funcionality, which is uploading a *.ppt files and possibly extract all slides and save them as images (at least, much better would be to extract all texts...

Excel to Powerpoint (But with tables not pictures)

excel,excel-vba,automation,powerpoint
I am attempting to automate powerpoint creation with table created in Excel. My issue is after the table pastes into powerpoint, it is not considered 'selected' right away. I get an error that generally that says something like 'no object selected' or "Method 'ShareRange' of object 'Selection' failed". If I...

Adding event code to checkbox in PowerPoint VBA

vba,dynamic,powerpoint,powerpoint-vba,buttonclick
I am developing a PowerPoint 2010 deck that presents the user with a series of pages containing one statement, one checkbox (built from a label element to enable changing the size of the checkbox) and forward/back arrows on each page. Since this will be used on numerous projects with varying...

PowerPoint VBA Macro Gives Run Time Error 448: Named argument not found

vba,powerpoint,powerpoint-vba
I'm trying to create a PowerPoint 2010 VBA Macro to add a text box to every slide. However, using the command from the MSOffice documentation to create a text box doesn't even work. Set myDocument = ActivePresentation.Slides(1) myDocument.Shapes.AddTextbox(Type:=msoTextOrientationHorizontal, _ Left:=100, Top:=100, Width:=200, Height:=50).TextFrame _ .TextRange.Text = "Test Box" This returns...