web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using VBA to read Powe...
Power Automate
Answered

Using VBA to read Powerpoint slides

(0) ShareShare
ReportReport
Posted on by 19

Hello all,

 

I would like to create a simple flow.

First step, the user selects a file (PPT file)

Second step is a VBA script that has to read slide titles and output a list of slides in a custom form

My VBA script looks like:

 

Set selectedPres=Presentations.Open("%SelectedFile.FullName%")
Set selectedSlides=ActivePresentation.Slides
For Each slide In selectedSlides
	...
Next

 

When I execute, I got "Presentations object is required". How get I get my script to know about this object?

I have the same question (0)
  • Verified answer
    VJR Profile Picture
    7,635 on at

    Hi @vince33 ,

     

    Just to clarify on certain terminologies - VBA (Visual Basic for Applications) and VBS (VBscript) are two different things.

     

    For accessing via Power Automate Desktop, a VBA code can be written as an Excel macro and then called via the "Run Excel Macro" action of PAD (Power Automate Desktop).

     

    (Note that a VBA code can be written inside Word, Powerpoint, Outlook, etc) but PAD does not have an action yet to call them from within these applications.)

     

    Whereas, a VBS can be written within PAD itself in the Run VBScript action.

     

    -------------------------

     

    What you have written seems to be a VBS (and not VBA).

    In either cases you will find the exact code if you search with the right keywords and terminologies.

    As an example of VBS, below is one to modify the title of a PPT.

    VBScript - Modify the Title of a Microsoft PowerPoint Slide (vbsedit.com)

  • vince33 Profile Picture
    19 on at

    thank you very much for clarifying my confusion between vbs and vba.

    This was my main issue

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 997

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 642

Last 30 days Overall leaderboard