Powerpoint 2003,更改图片

Powerpoint 2003,更改图片

我在 Powerpoint 2003 中有一张图片,如何更改该图片而不必删除它并重新添加?

我需要保存所有动画,重新添加它们大约需要 5 个小时,但如果我更改图片则只需 20 分钟。

或者如果有办法将自定义动画集复制到另一张图片上,那也很好

答案1

我相信这在 pp03 中仍然有效...您应该能够右键单击并单击更改图片...这是最简单的方法(在 pp07 和 pp10 中有效) http://www.screencast.com/t/OTQwM2U2OTMt

答案2

我有一些代码可用于 PPT 2003,因为它似乎没有任何机制可以在不破坏动画的情况下更改图片。您必须弄清楚如何选择要使用的图片(我会使用 ActiveWindow.Selection.ShapeRange(1)):

Function UpdateImage_BuildNewFromFile(TheImage As PowerPoint.Shape, ImageFile As String) As Boolean
    ' Create a new shape and add the image (unlinked) from TheImage, copy attributes and size, position, etc...

    UpdateImage_BuildNewFromFile = True
    On Error Resume Next
    'On Error GoTo PROC_ERR

    If TheImage Is Nothing Then GoTo PROC_ERR_BELOW

    If ImageFile = "" Then GoTo PROC_ERR_BELOW

    If Not TypeOf TheImage.Parent Is Slide Then GoTo PROC_ERR_BELOW
    Dim TheSlide As PowerPoint.Slide
    Set TheSlide = TheImage.Parent

    Dim NewShape As PowerPoint.Shape
    Set NewShape = TheSlide.Shapes.AddPicture(ImageFile, msoFalse, msoTrue, 100, 100)

    With NewShape
        With .PictureFormat
            .CropBottom = TheImage.PictureFormat.CropBottom
            .CropLeft = TheImage.PictureFormat.CropLeft
            .CropRight = TheImage.PictureFormat.CropRight
            .CropTop = TheImage.PictureFormat.CropTop
            .Brightness = TheImage.PictureFormat.Brightness
            .ColorType = TheImage.PictureFormat.ColorType
            .Contrast = TheImage.PictureFormat.Contrast
            .TransparentBackground = TheImage.PictureFormat.TransparentBackground
        End With
        .Left = TheImage.Left
        .Top = TheImage.Top
        .Width = TheImage.Width
        .Height = TheImage.Height
        SetZPosition NewShape, TheImage.ZOrderPosition
        With .AnimationSettings
            .AdvanceMode = TheImage.AnimationSettings.AdvanceMode
            .AdvanceTime = TheImage.AnimationSettings.AdvanceTime
            .AfterEffect = TheImage.AnimationSettings.AfterEffect
            .Animate = TheImage.AnimationSettings.Animate
            .AnimateBackground = TheImage.AnimationSettings.AnimateBackground
            .AnimateTextInReverse = TheImage.AnimationSettings.AnimateTextInReverse
            .AnimationOrder = TheImage.AnimationSettings.AnimationOrder
            .ChartUnitEffect = TheImage.AnimationSettings.ChartUnitEffect
            .DimColor = TheImage.AnimationSettings.DimColor
            .EntryEffect = TheImage.AnimationSettings.EntryEffect
            With .PlaySettings
                .ActionVerb = TheImage.AnimationSettings.PlaySettings.ActionVerb
                .HideWhileNotPlaying = TheImage.AnimationSettings.PlaySettings.HideWhileNotPlaying
                .LoopUntilStopped = TheImage.AnimationSettings.PlaySettings.LoopUntilStopped
                .PauseAnimation = TheImage.AnimationSettings.PlaySettings.PauseAnimation
                .PlayOnEntry = TheImage.AnimationSettings.PlaySettings.PlayOnEntry
                .RewindMovie = TheImage.AnimationSettings.PlaySettings.RewindMovie
                .StopAfterSlides = TheImage.AnimationSettings.PlaySettings.StopAfterSlides
            End With
            .TextLevelEffect = TheImage.AnimationSettings.TextLevelEffect
            .TextUnitEffect = TheImage.AnimationSettings.TextUnitEffect
        End With

    End With

PROC_EXIT:

    If Not TheImage Is Nothing Then TheImage.Delete

    On Error GoTo 0
    Exit Function

PROC_ERR:
    MsgBox Err.Description
    UpdateImage_BuildNewFromFile = False
    GoTo PROC_EXIT

PROC_ERR_BELOW:
    UpdateImage_BuildNewFromFile = False
    GoTo PROC_EXIT

End Function

相关内容