SharePoint Development from a Documentation Perspective

Andrew May

June, 2004

  • Andrew May's WebLog

    Animating Shapes in PowerPoint 2000 and 97 (Part 1)

    • 6 Comments

    So, while I was out of town, my first article dealing with PowerPoint animation made its debut:

    Comparing Ways to Control Animation in PowerPoint 2002 and 2003

    As I’ve mentioned in previous blog entries, there are actually two ways to programmatically animate shapes on a slide: one that works best for PowerPoint 2002 and 2003, and one that’s been retained for compatibility with PowerPoint 2000 and 97. This article examines the differences between the two, and discusses when using each is appropriate.

    Slated for publication next week is the first of a two-part article that covers how to use the revised and greatly expanded animation functionality included in PowerPoint 2002 and 2003.

    Now, while my articles naturally focus on the advantages of using the 2002 and 2003 functionality, in order to write these articles I had to learn how to use the 2000 and 97 functionality as well. And since there’s a large number of developers out there still working with those versions, it seems worthwhile to take a few minutes and present that information here. So for the next few days, I’ll be covering how to animate shapes using the AnimationSettings object.

    Applies to:

        Microsoft PowerPoint 2000

        Microsoft PowerPoint 97

    Introduction

    In PowerPoint, the term animations refers to special visual or sound effects you add to text or an object. Animation effects give motion to text, pictures, and other content on your slides. Besides adding action, they help you guide audience focus, emphasize important points, transition between slides, and maximize slide space by moving things on and off.

    These effects can include how the shape (or its component parts) enter the slide, what the shape does once it appears on the slide, and how it appears once the animation sequence moves to the next shape. You can set the animation sequence to advance to the next animation effect by the user clicking on the slide, or pre-set timing settings.

    Important If you are programming for PowerPoint versions 2002 or 2003, you should be using the TimeLine object model for dealing with animation effects; the AnimationSettings object model should only be used for PowerPoint versions 2000 and 97. The two object models are not compatible. Using the AnimationSettings object model for programming PowerPoint 2002 or 2003 is not recommended, as it can have unexpected and undesirable results for your animation sequences. For more information see Comparing Ways to Control Animation in PowerPoint 2002 and 2003.

    Animations in PowerPoint 2000 and 97

    In PowerPoint 2000 and 97, each Shape object on a slide can have a single animation effect, represented by that Shape object’s AnimationSettings object. You create and customize animations using the AnimationSettings object’s members and child objects. While each Shape object can have only one animation effect, in the case of charts or text, the animation effect may be a build effect, in which sub-objects of the shape are animated sequentially so that they combine, or build, to display the complete shape. We discuss build effect animations is greater detail later.

    Shapes that are not animated appear on the slide when it first loads.

    The individual animation effects for each shape collectively make up a slide’s animation sequence. There is one animation sequence per slide, and it starts when the slide loads.

    Setting the Type, Timing, and Order of a Slide’s Animation Sequence

    When you decide to add animation effects to a slide, the general questions you need to answer concern the sequence and timing of the shapes you want to animate:

    ·         Which shapes do you want to animate?

    ·         What kind of animation do you want PowerPoint to perform on each shape?

    ·         In what order do you want PowerPoint to animate the shapes?

    ·         How do you want to initiate each shape’s animation effect?

    Setting Which Shapes Get Animated

    For PowerPoint to animate a shape, you set the Animate property of its AnimationSettings object to msoTrue. PowerPoint automatically sets the Animate property to msoTrue in either of the following instances:

    ·         You set the TextLevelEffect property to a value other than ppAnimateLevelNone.

    ·         You set the EntryEffect property to a value other than ppEntryEffectNone.

    The converse is also true. PowerPoint automatically sets the Animate property to msoFalse if you set the TextLevelEffect property to ppAnimateLevelNone, or set the EntryEffect property to ppEntryEffectNone.

    Even if you have set other properties of the AnimationSettings object, PowerPoint disregards them and does not animate the shape unless the Animate property is set to msoTrue.

    Shapes with an EntryEffect property of ppEffectNone are visible when the slide loads.

    There are instances when you would want to set the EntryEffect property to ppEffectNone. For example, you could have a media object you want visible on the slide when it loads, even if you do not want to play the file until the fourth animation in the sequence. The following code does just that. Note that the code explicitly sets the Animate property is to True after it specifies the EntryEffect property as ppEffectNone.

    With ActivePresentation.Slides(1).Shapes

     

        Set objShape = .Item("Title")

            With objShape.AnimationSettings

                .EntryEffect = ppEffectBlindsHorizontal

                .AnimationOrder = 1

            End With

        Set objShape = .Item("Shape1")

            With objShape.AnimationSettings

                .EntryEffect = ppEffectFlyFromLeft

                .AnimationOrder = 2

            End With

        Set objShape = .Item("MovieClip")

            With objShape.AnimationSettings

                .EntryEffect = ppEffectNone

                .Animate = msoTrue

                .AnimationOrder = 3

            End With

    End With

    Specifying the Animation Effect PowerPoint Performs on a Shape

    Use the EntryEffect property to specify which animation effect you want PowerPoint to perform on the selected shape. All animation effects created using the AnimationSettings object are entrance effects. Entrance effects are animations that control how the shape becomes visible on the slide. For example, this could involve having the shape appear to move onto the slide from outside the slide boundaries, such as flying in from the right edge of the slide; or having the shape become visible in place in a particular manner, such as dissolving into visibility.

    By default, if you do not set an animation effect for a shape, PowerPoint uses the ‘Appear’ effect, ppEntryEffectAppear. The code example in the following section demonstrates this.

    Tomorrow, we’ll tackle setting the animation order of the shapes on a slide, and how to trigger a shape’s animation effect.

  • Andrew May's WebLog

    Animating Shapes in PowerPoint 2000 and 97 (Part 2 of 4)

    • 3 Comments

    So yesterday we started talking about how to animate shapes if you’re programming for PowerPoint 97 or 2000. Today we continue by discussing how to trigger your animation effects, and control the order in which they occur. We’ll also touch on how to further customize a shape’s animation, by adding sound and/or changing the shape’s post-animation appearance.

    Setting the Order in Which PowerPoint Animates Shapes

    The AnimationOrder property of each shape determines the order in which PowerPoint animates the shape, from the lowest number to the highest. By default, if you don’t explicitly specify an animation order, PowerPoint sets the animation order in the order in which you set the Shape objects to be animated; that is, the order in which you set the Animate property to msoTrue for each Shape object. The first shape for which you set Animate to msoTrue is first in the animation sequence, the next second, and so on. If you later set a Shape objects AnimationOrder property to a specific value, PowerPoint re-orders the index of each shape’s animation accordingly.

    The following code demonstrates this. The code creates a new blank slide, then adds four shapes and specifies that each be animated. No animation index is specified, so PowerPoint sets each shape as the next in the animation sequence as the code specifies each to be animated. The code prints the name and animation order of each shape. Then the code adds a fifth shape, and explicitly sets the animation index of this shape to ‘2’. PowerPoint automatically resets the animation order index of each shape that comes after the new shape in the animation order. Lastly, the code prints the name of each shape, and its revised animation order.

    Sub DemoAnimationIndexing()

    Dim iCount As Integer

    Dim objShape As Shape

     

    ActivePresentation.Slides.Add Index:=1, Layout:=ppLayoutBlank

     

    With ActivePresentation.Slides(1).Shapes

        For iCount = 1 To 4

            Set objShape = .AddShape(msoShapeCube, 100, 100, 100, 100)

            objShape.Name = "Cube " & iCount

            With objShape.AnimationSettings

                .Animate = msoTrue

                '.AnimationOrder = iCount

            End With

            Debug.Print objShape.Name & _

                " Animation Order: " & _

                objShape.AnimationSettings.AnimationOrder

        Next iCount

       

        Set objShape = .AddShape(msoShapeCube, 100, 100, 100, 100)

        objShape.Name = "Cube 5"

        With objShape.AnimationSettings

            .Animate = msoTrue

            .AnimationOrder = 2

        End With

       

        For iCount = 1 To .Count

            Debug.Print .Item(iCount).Name & _

                " Animation Order: " & _

                .Item(iCount).AnimationSettings.AnimationOrder

        Next iCount

     

    End With

    End Sub

    Setting How PowerPoint Advances to the Next Animation Effect

    You can specify when you want PowerPoint to advance to the next shape animation in the animation sequence: either when the user clicks the slide, or after a specified time interval. Use the AdvanceMode property to specify whether you want PowerPoint to perform a shape’s animation when the user clicks on the slide, or after a certain period of time. For timed advancement, use the AdvanceTime property to specify the time, in seconds, PowerPoint should wait after the last animation effect before performing the specified animation.

    By default, the AdvanceMode property is set to ppAdvanceModeOnClick.

    The following example sets a shape to be the first shape animated when the slide loads, and for PowerPoint to automatically animate the shape five seconds after the slide loads.

    Dim objShape As Shape

    With ActivePresentation.Slides(1).Shapes

     

        Set objShape = .Item("Title")

            With objShape.AnimationSettings

                .EntryEffect = ppEffectBlindsHorizontal

                .AnimationOrder = 1

                .AdvanceMode = ppAdvanceOnTime

                .AdvanceTime = 5

            End With

    End With

    Further Customizing Your Animation Effects

    Once you’ve set which shapes get animated, with which animation effects and in which order, you can customize the animation effect for each shape even further. You can add a sound effect to a shape’s animation, and alter the appearance of a shape once PowerPoint has performed the shape’s animation effect.

    In addition, certain types of Shape objects have additional animation functionality. You can animate text and charts to build piece-by-piece, to reveal the complete shape. If you animate media or OLE objects, you can customize how they perform as part of their animation effect.

    Adding Sound to Your Animation Effects

    You can also add a sound effect to a shape’s animation effect. This is different from adding sound files to the slide itself. An animation sound effect is not an independent shape that appears on the slide; rather, it is a sound file that plays when PowerPoint animates the shape to which it is assigned. The SoundEffect object, a child of the AnimationsSettings object, contains members that enable you to set and control a Shape object’s animation sound effect.

    Use the ImportFromFile method to specify a sound file you want imported and used as an animation sound effect. You can also use a sound effect that is native to PowerPoint by setting the Name property.

    You can also use the SoundEffect object to stop a sound effect from a previous shape’s animation effect. By default, PowerPoint plays each sound effect through once, unless the next shape’s animation starts first, and it has a sound effect. But you might want to stop the previous sound effect when the next shape’s animation begins, but that shape’s animation effect does not have a sound effect. In this case, set the SoundEffect.Type property of the second shape to ppSoundEffectStopPrevious. This stops the previous sound effect; you do not need to specify a sound file for the sound effect.

    For shapes with build animations, such as text or charts, the sound effect restarts each time PowerPoint animates the next sub-object. For example, if you set the TextLevelEffect property to ppAnimateByFirstLevel, the sound effect restarts each time PowerPoint animates the next first level paragraph. In addition, if you set the TextUnitEffect property to ppAnimateByCharacter or ppAnimateByWord, then the sound effect restarts each time PowerPoint animates the next character or word, respectively.

    The following example specifies the animation settings for the selected shape on a slide. The code specifies that PowerPoint display the text in the shape character by character, playing the typewriter sound effect each time PowerPoint displays a new character. Note that “Typewriter” is a native PowerPoint sound effect.

    With .Shapes("Body Text").AnimationSettings

      .TextLevelEffect = ppAnimateByFirstLevel

      .TextUnitEffect = ppAnimateByCharacter

      .SoundEffect.Name = "Typewriter"

    End With

    Changing the Appearance of the Shape Once PowerPoint Completes the Animation Effect

    You can also specify how you want the Shape to appear once the animation is finished by using the AfterEffect property. You can use after effects to de-emphasize a slide element once you want to move the user’s focus elsewhere, and to conserve slide ‘real estate’. For example, you can set shapes or text to turn a neutral color, so they fade into the slide background and do not distract from the slide shape being animated next. You can also set PowerPoint to render a shape invisible, either immediately after PowerPoint finishes animating it, or on the next slide click. With the exception of ppAfterEffectHideOnClick, PowerPoint performs the specified after effect as soon as it finishes animating the shape.

    By default, the AfterEffect property is set to ppAfterEffectNothing.

    If you specify ppAfterEffectDim, you can use the DimColor property to specify a ColorFormat object representing the dim color you want. The dim color is the color PowerPoint turns the shape or text once PowerPoint is done animating it.

    Next time, we’ll cover build effect animations: what they are, and how to assign and customize them.

  • Andrew May's WebLog

    OneNote 2003 SP1 Preview Documentation Live On MSDN

    • 2 Comments

    The title pretty much says it all. The final versions of the OneNote SP1 Preview documentation I posted here in draft version about a month ago went live on MSDN last night:

    Importing Content into OneNote 2003 SP1 Preview

    Customizing OneNote 2003 SP 1 Using New Command Line Switches

    So we’ve pulled together the information from my assorted blog entries, cleaned it up, and made it ready for prime time. It’s worth taking a look at, even if you’ve already read the original blog entries. And do me a favor: rate the articles. It’s the only way we know if we’re addressing your needs. Thanks.

  • Andrew May's WebLog

    Playing Invisible Sound Clips Revisited

    • 1 Comments

    So, it turns out there’s still more to report on how to programmatically control your media objects in PowerPoint. And it’s good news, so read on.

    I originally wrote about how to have a sound clip play automatically when a slide is loaded, without having the sound file icon visible. I used the AnimationSettings.PlaySettings object, which works fine for PowerPoint 2000 and below. But it’s the exact wrong thing to do with PowerPoint 2002 and 2003, as it may lead to some of your other animation effects being deleted from the slide. Then I showed how you could do the same thing using the TimeLine object. Unfortunately, because of a flaw in the object model, when you access the PlaySettings object through the TimeLine object, you still might end up deleting effects unless you’re very careful.

    Now, thanks to PowerPoint’s wonderful development team, I’ve learned that you can actually set a media object to play, pause, and stop, all without accessing the PlaySettings object. This presents a nice work-around that prevents you from accidentally deleting animations from your slide. Here’s how it works:

    Turns out there are three effect types that control the playing of a sound or movie file: MsoAnimEffectMediaPause, MsoAnimEffectMediaPlay, and MsoAnimEffectMediaStop. By assigning Effect objects of these effect types to a media object, you can control when the audio or video file plays during your animation sequence, without accessing the PlaySettings object.

    So, going back to our example from those previous entries, here’s how you would insert a sound file, move it off the viewable slide area, and create an Effect object that would play the file as soon as the slide loads:

     

    Sub AddAudioOffSlide()

    Dim shpSound As Shape

     

    With ActivePresentation.Slides(1)

        'Add sound file

        With .Shapes

            Set shpSound = .AddMediaObject _

                (FileName:="C:\soundfiles\bobmould\black sheets of rain.mp3")

            'Position sound file off viewable slide area

            With shpSound

                .Left = 0 - .Width

                .Top = 0 - .Height

            End With

        End With

       

        With .TimeLine.MainSequence

            'Add effect to play sound file

            'As first effect in main sequence

            'set effect to perform when slide is loaded

            .AddEffect Shape:=shpSound, _

                effectId:=msoAnimEffectMediaPlay, _

                trigger:=msoAnimTriggerWithPrevious, _

                Index:=1

               

        End With

       

    End With

    Now obviously, with the ability to play, pause, and stop media files, you create much more complex animation sequences than the above example.

    One interesting thing worth mentioning: the MsoAnimEffectMediaPause effect type actually functions to toggle whether the media object is playing or not. That is, if the media file is playing, assigning an MsoAnimEffectMediaPause effect to the file pauses it; but if the file is already paused, assigning another MsoAnimEffectMediaPause effect to the file causes the file to resume playing from the point at which it was pause. Conversely, an MsoAnimEffectMediaPlay effect always starts the file playing from the beginning of the file, whether or not the file is currently paused at a certain point in the file.

    The following example adds effects for a video file to a slide’s main animation sequence. When the user clicks the page, the video file plays for 10 seconds, then pauses for 10 seconds, then starts playing for another 10 seconds before it stops. To accomplish this, the code adds four effects to the sequence. The first starts the file playing; the second pauses the file; the third starts the file playing again; and the final effect stops the file playing. The first effect is triggered when the user clicks the page; the other three are set to be triggered with the previous effect. The code sets the trigger delay time for each effect is set to different durations; otherwise, PowerPoint would perform all the effects simultaneously.

    Note that the third effect, the one that resumes the file playing from the point where it was paused, is of type MsoAnimEffectMediaPause rather than type MsoAnimEffectMediaPlay.

     

    Dim shpVideo As Shape

    Dim effPause As Effect

    Dim effPlayAgain As Effect

    Dim effStop As Effect

     

    With ActivePresentation.Slides(1)

        Set shpVideo = .Shapes("demovideo")

       

        With .TimeLine.MainSequence

            .AddEffect Shape:=shpVideo, _

                effectId:=msoAnimEffectMediaPlay, _

                trigger:=msoAnimTriggerOnPageClick

            Set effPause = .AddEffect(Shape:=shpVideo, _

                effectId:=msoAnimEffectMediaPause, _

                trigger:=msoAnimTriggerWithPrevious)

            effPause.Timing.TriggerDelayTime = 10

            Set effPlayAgain = .AddEffect(Shape:=shpVideo, _

                effectId:=msoAnimEffectMediaPause, _

                    trigger:=msoAnimTriggerWithPrevious)

            effPlayAgain.Timing.TriggerDelayTime = 20

            Set effStop = .AddEffect(Shape:=shpVideo, _

                effectId:=msoAnimEffectMediaStop, _

                    trigger:=msoAnimTriggerWithPrevious)

            effStop.Timing.TriggerDelayTime = 30

        End With

    End With

    For more information about inserting media objects to a presentation, you can always refer to my article Adding Multimedia to a PowerPoint 2003 Presentation.

    I’m working on several articles dealing with how to create and customize animation sequences in PowerPoint 2002 and above. With any luck they’ll be published in a few weeks. Of course, I’ll post the links here once those articles go live.

    Many thanks again to the PowerPoint development team for their willingness to bring me up to speed and (gently) correct my mistakes.

  • Andrew May's WebLog

    Animating Shapes in PowerPoint 2000 and 97 (Part 3 of 4)

    • 1 Comments

    Today, we talking about build effects. If you’re just joining us, you can find the first two parts of this series here and here.

    Creating Build Animation Effects for Text and Charts

    As mentioned earlier, you can create a special type of animation effect for text and chart objects. For these types of shapes, you can specify a build animation, in which sub-objects of the shape are animated sequentially so that they combine, or build, to display the complete shape. For example, suppose you have a single text box that contains five bullet points. You can specify that each bullet point enter the slide individually.

    Use the ChartUnitEffect property for chart shapes, or the TextLevelEffect property for text boxes, to specify a Shape object’s build level; this refers to the lowest level of sub-objects at which you want to assign the effect. For example, for a text box effect with a build level of ppAnimateBySecondLevel, each first and second level bullet point, or paragraph, would be animated separately. Third, fourth, and fifth level paragraphs would be animated at the same time as the second level paragraph above them.

    By default, the ChartUnitEffect property is set to ppAnimateByChartAllAtOnce, and the TextLevelEffect property is set to ppAnimateByLevelNone.

    In addition, for text you can use the TextUnitEffect property to specify the level at which you want PowerPoint to animate the text within each paragraph: by character, word, or paragraph. By default, the TextUnitEffect property is set to ppAnimateByParagraph.

    Finally, you can use the AnimateTextInReverse property to have PowerPoint animate your text build in reverse order, last point first, first point last. For example, if you constructed a slide listing the top ten reasons for something, or the top ten finalists in a contest, you might want to display the list in reverse order.

    The following example creates a new slide in the active presentation, and adds a title and three paragraphs, or bullet points. The code sets the title to be animated character-by-character, and uses a color scheme to set the dim color for the title once its animation concludes. For the body text, the code sets the build level to the first level, meaning that the second level paragraph appears on the slide at the same time as the first level paragraph above it. The code also sets the dim color for the body text paragraphs.

    With ActivePresentation.Slides.Add(2, ppLayoutText).Shapes

        With .Item(1)

            .TextFrame.TextRange.Text = "Title"

            With .AnimationSettings

                .Animate = msoTrue

                .TextLevelEffect = ppAnimateByAllLevels

                .TextUnitEffect = ppAnimateByCharacter

                .AfterEffect = ppAfterEffectDim

                .DimColor.SchemeColor = ppShadow

            End With

        End With

        With .Item(2)

            With .TextFrame.TextRange

                .Text = "This is the first level heading" & vbCrLf

                .InsertAfter "This is the second level heading" & vbCrLf

                .InsertAfter "This is another first level heading"

                .Paragraphs(1, 1).IndentLevel = 1

                .Paragraphs(2, 1).IndentLevel = 2

                .Paragraphs(3, 1).IndentLevel = 1

            End With

            With .AnimationSettings

                .Animate = msoTrue

                .TextLevelEffect = ppAnimateByFirstLevel

                .AfterEffect = ppAfterEffectDim

                .DimColor.RGB = RGB(100, 150, 130)

            End With

        End With

    End With

    To determine if a given shape is a chart, placeholder or text box, use the Type property of the Shape object. This property returns an MsoShapeType constant, such as MsoChart, or MsoPlaceholder or MsoTextBox. Placeholder shapes contain a PlaceholderFormat child object, which in turn includes a Type property that identifies what kind of placeholder the shape is.

    Assigning Indent Levels to Text

    Because you assign build effects to a shape’s text based on the indent levels of the text paragraphs, such as first-level, second-level, etc., it’s worth discussing how to specify the indent level for text.

    Each Shape has a TextFrame object, which in turn has a TextRange object that contains all the text in that shape. You can then use various methods of the TextRange object to return other TextRange objects that represent various subset of the text in the shape, such as paragraphs, sentences, lines, runs, words, or characters. The IndentLevel property of a given TextRange returns or sets the indent level assigned to that text.

    You can specify one indent level per paragraph. If you assign an indent level to a text range that is a sub-set of a paragraph, such as a single sentence or character run, that indent level is applied to the entire paragraph. If you assign an indent level to a text range that encompasses text in multiple paragraphs, then each of those paragraphs is assigned the specified indent level. For example, if you change the indent level of a sentence, word, or run in a second-level paragraph to 3, then the indent level for the entire paragraph is set to 3.

    Because the objects returned by the various TextRange methods are TextRange objects themselves, they have all the methods and properties of that type. For example, TextFrame.TextRange.Paragraphs.Count returns the number of paragraphs contained in a shape’s text frame. Use the Paragraphs method to set the indent level of your paragraphs.

    The following code example adds four paragraphs, or bullet points, to a shape on a slide. It then uses the Paragraphs method to individually return and set the indent level of each of those paragraphs.

    With objShape.TextFrame.TextRange

      .Text = "This is the first level heading" & vbCrLf

      .InsertAfter "This is the second level heading" & vbCrLf

      .InsertAfter "This is the third level heading" & vbCrLf

      .InsertAfter "This is another first level heading"

      .Paragraphs(1, 1).IndentLevel = 1

      .Paragraphs(2, 1).IndentLevel = 2

      .Paragraphs(3, 1).IndentLevel = 3

      .Paragraphs(4, 1).IndentLevel = 1

    End With

    Tomorrow we’ll talk about setting media objects and OLE objects to perform as part of their animation effects. And if you’re good, maybe I’ll throw in some object model diagrams as well.

  • Andrew May's WebLog

    Animating Shapes in PowerPoint 2000 and 97 (Part 4 of 4)

    • 1 Comments

    (Previous entries in this series: part one, part two, and part three.)

    Creating Animation Effects for Media and OLE Objects

    For audio and video files inserted as media objects, not only can you set the shape’s animation effect, as with other shapes, but you can customize how the file plays as part of its animation effect as well. The PlaySettings object contains properties that enable you to customize how sound and movies play when they are animated. Table 1 lists these properties, and what you use each for.

    Table 1. Selected PlaySettings object properties.

    PlaySettings property

    Definition

    HideWhileNotPlaying

    Set whether to display the media object when it is not playing.

    LoopUntilStopped

    Set the file to play continuously until it’s stopped by the user clicking it, or the next slide transition.

    PauseAnimation

    Set whether the animation sequence for the slide is paused until the file completes playing.

    PlayOnEntry

    Set whether the file plays when the file’s entry effect occurs as part of the slide’s animation sequence.

    RewindMovie

    For video files, set whether the first frame of the movie is automatically redisplayed as soon as the movie has finished playing.

    StopAfterSlides

    Set the file to stop playing after a specified number of slides have been displayed or when the media clip comes to an end, whichever happens first.

     

    You can also specify that an OLE object perform one of its verbs as part of its animation effect. Use the ActionVerb property to specify which of its verbs the OLE object performs.

    Each Shape that represents an OLE object contains a OLEFormat object. The actions an OLE object can perform are contained in the ObjectVerbs collection, which is a child of the OLEFormat object. For example, the following code returns the verbs available for the specified OLE object:

    Dim intCount As Integer

    With ActivePresentation.Slides(5).Shapes("AVI File") _

        .OLEFormat.ObjectVerbs

        For intCount = 1 To .Count

            Debug.Print intCount & "  " & .Item(intCount)

        Next

    End With

    Note that if you insert an audio or video file as an OLE object, rather than as a media object, you cannot set PlaySettings properties for that shape that apply to media objects.

    To determine if a given shape is a media or OLE object, use the Type property of the Shape object. This property returns an MsoShapeType constant, such as MsoEmbeddedOLEObject, or MsoLinkedOLEObject or MsoMedia.

    For more information on adding media and OLE objects to your presentations programmatically, see Adding Multimedia to a PowerPoint 2003 Presentation.

    Object Model Maps

    The following diagrams detail the structure of the AnimationSettings object model section.

     

    Figure 1. The AnimationSettings Object

     

    Figure 2. The PlaySettings and SoundEffect Objects

    So there you go. As you might have guessed, about half way through writing these entries, I realized I had a full-blown article on my hands. So I’ll probably roll these entries together, clean ‘em up, and submit them as a single article for the Office Developer Center. But it may be awhile until the finished, polished article appears on MSDN, so in the meantime, here’s the information in draft form.

Page 1 of 1 (6 items)