FAQ Database Discussion Community


PowerPoint Macro - Need to add Rectangle with Notes to each Slide

powerpoint-vba
I have a PowerPoint with notes for each slide. For each slide, I want to copy the notes, create a yellow rectangle with black border, and paste the notes into the rectangle. I started "splicing" a macro together. Here is what I have so far. It works but rectangle is...

Copying a Range from Excel and Pasting it into Powerpoint NOT as a metafile but as a table which you can edit in PPP

vba,excel-vba,powerpoint-vba
All I want to do is copy a range from Excel and then paste this range into PowerPoint. When my range is manually copied from Excel to the clipboard... If I right click on a blank slide when pasting into PowerPoint, it gives me the option to paste "using destination...

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...

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...

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...

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...

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...

Replacing a variable in vba powerpoint

vba,excel-vba,variables,powerpoint-vba
I am trying to replace and save an integer in VBA Powerpoint. I have a variable in 1 Subroutine named projectId. At the moment, the variable is set to 617. In another subroutine I am running a user input method that prompts the user for a new projectId and stores...

VBA, how to paste word table as picture (enhanced metafile) to a power point?

excel,vba,excel-vba,word-vba,powerpoint-vba
I have an excel workbook that acts as a dashboard and run code to open multiple word files with one table, copies the table and then pastes it to a specific slide in a power point. I am trying to figure out how to copy table from word and paste...

Create animated random image display tool in VBA

vba,powerpoint-vba
I have a PowerPoint slide with different images. I need to create VBA code in PowerPoint that recognises all these images and fades them out one by one - except for one randomly chosen image. This last image should remain until the end, then fade out and display in the...

PowerPoint Text to Speech Macro

vba,excel-vba,text-to-speech,powerpoint-vba,powerpoint-2010
I want to be able to create a macro that will start text-to-speech on the text that is in the presenters notes. I will be applying the macro to a ActiveX button that will allow the user to start the reading and eventaully I would like to time the animations...

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...

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!...

Reffering / returning value's source cell address from ActiveChart.SeriesCollection(i).Points(j) / VBA / Excel / PowerPoint

vba,excel-vba,powerpoint-vba
I've got chart in Excel/PowerPoint. In this chart I would like to get value's source cell address for every data point from ActiveChart.SeriesCollection(i).Points(y) Because Excel makes series automatically (this chart is made not with VBA) so I don't make this refference from scratch (not defining data series myself). I know...

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...

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...

How to add a group to a (VBA) custom ribbon without xmlns/idQ?

vba,excel-vba,word-vba,ribbon,powerpoint-vba
Situation: Users have an existing custom ribbon that is added via a .PPAM (combination of VBA macros and Ribbon customization XML). We want to add a group to that custom ribbon via our managed COM add-in For custom ribbons from other managed COM add-ins this is feasible via the xmlns:foo="bar"...

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...

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...