代码之家  ›  专栏  ›  技术社区  ›  Frames Catherine White

制作宏以在Powerpoint中生成自定义显示

  •  3
  • Frames Catherine White  · 技术社区  · 15 年前

    我想为PowerPoint制作一个宏,以生成一个自定义放映,其中包含PowerPoint中的所有幻灯片,但顺序是随机的。 我该怎么做? 我希望能够运行它,并创建不同的自定义显示每次。

    1 回复  |  直到 4 年前
        1
  •  3
  •   phoebus    15 年前

    查看信息 here

    Sub sort_rand()
    
        Dim i As Integer
        Dim myvalue As Integer
        Dim islides As Integer
        islides = ActivePresentation.Slides.Count
        For i = 1 To ActivePresentation.Slides.Count
            myvalue = Int((i * Rnd) + 1)
            ActiveWindow.ViewType = ppViewSlideSorter
            ActivePresentation.Slides(myvalue).Select
            ActiveWindow.Selection.Cut
            ActivePresentation.Slides(islides - 1).Select
            ActiveWindow.View.Paste
        Next
    
    End Sub
    
    推荐文章