powerpoint-vba

Branching Slides in PowerPoint (VBA)

I am trying to create a back button but using hyperlinks it simply just takes me to the previous page and ends up in a loop... e.g. if I have slide 1 which has links to slide 3, 4 & 5 then slide 3 links to 6 & 7. If I'm currently on slide 7 and click back it successfully takes me back to slide 3 but then I want to click back and end up a...

How to simulate ThisPresentation in PowerPoint VBA

I would like to be able to access the document properties of a PowerPoint add-in file (a presentation saved as "PowerPoint Add-in (*.ppa)", from some VBA code in the add-in itself. If it helps to understand the problem, what I'm actually trying to do is read a custom document property that stores the version number of the add-in, so tha...

Making a macro to generate a custom show in Powerpoint

I want to make a macro for PowerPoint, to generate a custom show, containing all the slides from my PowerPoint but in random order. How would I do this? I want to be able to run it and create different custom shows each time. It's been 3 years since I used PowerPoint, and the only experience I have with VB was a little bit of VB6 in 200...

MS Access 2003 - Question about extracting information from ppt slides

Just wondering: If I have a ppt slides that I want to extract information out of, and I set up the template for all these slides that are used by various people through out the organization, and I know all the "names" to each text box object, can I use some vb to pull that information out of the ppt slides into an access database? I k...

How to detect Theme fonts in Powerpoint 2007 VBA?

Does anyone know how to detect the use of Theme fonts in Powerpoint 2007 slide objects using VBA? If one looks at Shape.TextFrame.TextRange.Font.Name the font name appears as simple name (ex: "Arial") whether or not the font was assigned as a fixed name or a Theme name (subject to change with the document theme). I don't see any other...

How to switch between "active paper" and "slides" in Power Point VBA

Hello everybody, I have a simple question regarding PowerPoint VBA: Which VBA code should I use to switch between the "active sheet of paper" (I am sorry I don't know how to name it properly), in which I am doing something with the object(s), and the file (or "field", again sorry for my poor terminology) where all the slides are ? Fo...

How to create dots in Power Point VBA, move them around in different directions while keeping them connected with straight lines?

Hello everybody. There is one thing I want to do in PowerPoint VBA. I want to create two dots in the main window - dot A and dot B - by their given coordinates: for example, A (232, 464) and B (109, 567). I don't know how to do it in PowerPoint VBA. I know how to create a simple straight line. I use this macro code for that: Sub Crea...

How to make a loop in PowerPoint VBA?

As far as I know, the code below gets a shape from the active window, nudges it a bit, copies the slide and pastes it right after the current one, then turns the pasted slide into an active window, and nudges it again: Sub Test() ' Get the active presentation Dim oPresentation As Presentation Set oPresentation = ActivePresentation ...

In PowerPoint VBA, how to nudge all the present shapes in the window (not only one)?

As far as I understand, this code "grabs" only the first shape in the active window and nudges it: Set oShape = oSlide.Shapes(1) oShape.Left = oShape.Left + 5 How can I "grab" all the shapes in the window and nudge them all at once? ...

How to do the square root in PowerPoint VBA?

Here is some math code that adds A to B: Sub math() A = 23 B = 2 ABSumTotal = A + B strMsg = "The answer is " & "$" & ABSumTotal & "." MsgBox strMsg End Sub But how can I calculate a square root of ABSumTotal? Is it possible in PowerPoint VBA? ...

VBA: How to perform an action on specific elements of an array

In VBA for PowerPoint, as far as I understand, this code gets only the first shape in the active window and nudges it: Set oShape = oSlide.Shapes(1) oShape.Left = oShape.Left + 5 And if I wanted to nudge all the shapes, I would use a loop for this. But how can I get and nudge only certain shapes, based on their number? For exampl...

What tutorial you would recommend to study PowerPoint VBA?

I feel I lack some real basics and I feel I would waste your time if ask all those basic questions here. Can you please recommend a good PowerPoint VBA tutorial that would explain basics to me. A tutorial povided with examples is prefered. ...

Is there a future for PowerPoint VBA/VSTO?

Does anyone know what the future holds for VBA/VSTO programming in PowerPoint? I've been working on a Office automation project and find it frustrating to work with PowerPoint in particular since it seems to be one level below VBA support found in Excel or Word. It feels like MS is trying to phase out support for VBA in PowerPointsinc...

How to increase the size of a shape nudge with each new slide in PowerPoint VBA?

This code creates a string of 10 slides, in which each next slide's 2 shapes (number 1 and number 3) are nudged a bit in relation to similar shapes in the previous slide, while one shape (number 2) remains in the same position throughout. Each nudge is equal to 2 points (pixels?), but I wonder how could I modify this code so that each n...

Why does this slides-creating loop in VBA PowerPoint not work?

I have tried to create this script that would create 10 empty slides, but it doesn't work for some reason: Sub CreatingSlides() Dim oPresentation As Presentation Set oPresentation = ActivePresentation Dim oSlide As Slide Dim oSlides As SlideRange Dim oShape As Shape Dim slideNumber As Integer Dim myindex As I...

How to restart macro in PowerPoint VBA by changing slides

I am creating a timer in PowerPoint VBA and I would like it to restart when the user presses back on the remote control. For this, I used this sub: Private Sub PPTEvent_SlideShowBegin(ByVal Wn As SlideShowWindow) Call Tmr End Sub But nothing happens when I press back (or left arrow key). I would also like the macro to start when ...

How to identify a selected slide is a master slide in PowerPoint 2003 Programmatically

Recently I was working with a code to open a PowerPoint presentation (by vb.net) object and process each slide by slide. If processing slide is not null or a master slide I need to skip and go to the next one. Can anyone show me how to check whether a given slide is a master slide? Is there any way to check it by slide type? Public S...

How to write PowerPoint slide change to a file?

I want to write to a file every time a slide is changed (next/back) in PowerPoint. With presentation.pps I want to write in the file something like: presentation - slide 1 - 11h04m03s presentation - slide 2 - 11h04m34s Does anyone know how to do this? ...

Powerpoint VBA - Distribute columns evenly

I am using PowerPoint 2000 which does not have the distribute columns evenly function that 2003 and newer has. Does anyone know what VBA code would be used to distribute selected table columns evenly? (I know how to do it for the WHOLE table by finding the table width, dividing it by the number of columns, and adjusting each column's wi...

Creating Powerpoint/Keynote Presentations with scriptability?

Lately I have been creating PowerPoint presentations to companies. I have mostly been doing this in PowerPoint. Basically they are created by the same design, but just different numbers in set places, and different numbers used to generate the PowerPoint bar graph / pie graph stuff. (basically there are these pie graph objects when inser...