Supercharge your PowerPoint productivity with
Supercharge your PPT Productivity with PPTools - Click here to learn more.

Proud member of

PPTools

Image Export converts PowerPoint slides to high-quality images.

PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements

Merge Excel data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more

Resize your presentations quickly and without distortion

Language Selector switches the text in your presentation from one language to another

FixLinks prevents broken links when you distribute PowerPoint presentations

Shape Styles brings styles to PowerPoint. Apply complex formatting with a single click.

Adding ALT text to audio shapes

Problem

If your're required to ensure that your presentations are ADA compliant, that will include adding ALT text to images, graphics and sounds that you've added to your slides.

You can do this manually (right-click the shape, choose the format option, then in the formatting pane, choose Alt text and add the text there). But this can become very tedious when you've got, for example, a narration sound file on every slide and you just need to add Alt text like "Click here to play the narration" to each of them.

Solution

Here's a quick fix. This VBA macro will add any text you like as ALT text to every sound file in a presentation:

Sub AddAltTextToAudio()
' This will add the same alt text to every audio object
' in the current presentation.
' You can make the alt text anything you wish.
' Just edit the sAltText= line below.

    Dim oSl As Slide
    Dim oSh As Shape
    Dim sAltText As String

    ' What should the alt text say?  Edit here if desired:
    sAltText = "Click here to play the narration"

    ' Look at each slide
    For Each oSl In ActivePresentation.Slides
        ' Look at each shape on each slide
        For Each oSh In oSl.Shapes
            ' Is it media object
            If oSh.Type = msoMedia Then
                ' Is the media object a SOUND?
                If oSh.MediaType = ppMediaTypeSound Then
                    ' It IS.  Add Alt text
                    oSh.AlternativeText = sAltText
                End If
            End If
        Next    ' shape
    Next    ' slide
End Sub

See How do I use VBA code in PowerPoint? to learn how to use this example code.


Did this solve your problem? If so, please consider supporting the PPT FAQ with a small PayPal donation.
Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2022 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.

Supercharge your PPT Productivity with PPTools

content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

Adding ALT text to audio shapes
http://www.pptfaq.com/FAQ01290-Adding-ALT-text-to-audio-shapes.htm
Last update 21 June, 2020
Created: 21 June, 2020