PowerPoint VBA教程:SlideIDs属性

返回指定命名幻灯片放映的一个幻灯片 ID 数组。只读。Variant 类型。

VBA示例

本示例将当前窗口中的当前幻灯片添加到自定义幻灯片放映“Marketing Short Version”中。请注意,要保存修改后的自定义幻灯片放映,必须删除原自定义放映,再使用相同名称重新添加。另请注意,要调整包含于 Variant 变量中的数组大小,必须在调整该数组大小前清楚地声明该变量。


'NOTE - The following code line is NOT optional.
'Can't redim array without this
Dim customShowSlideIDs As Variant
Dim customShowToExpand As NamedSlideShow
customShowName = "Marketing Short Version"
Set customShowToExpand = ActivePresentation.SlideShowSettings _
    .NamedSlideShows(customShowName)
slideToAddID = ActiveWindow.View.Slide.SlideID
customShowSlideIDs = customShowToExpand.SlideIDs
numSlides = UBound(customShowSlideIDs)
ReDim Preserve customShowSlideIDs(numSlides + 1)
customShowSlideIDs(numSlides + 1) = slideToAddID
customShowToExpand.Delete
ActivePresentation.SlideShowSettings.NamedSlideShows _
    .Add customShowName, customShowSlideIDs

上页:PowerPoint VBA教程:SlideID属性 下页:PowerPoint VBA教程:SlideIndex属性

PowerPoint VBA教程:SlideIDs属性

PowerPoint VBA教程:SlideIndex属性 PowerPoint VBA教程:SlideMaster属性
PowerPoint VBA教程:SlideNumber属性 PowerPoint VBA教程:SlideOrientation属性
PowerPoint VBA教程:SlideRange属性 PowerPoint VBA教程:Slides属性
PowerPoint VBA教程:SlideShowName属性 PowerPoint VBA教程:SlideShowSettings属性
PowerPoint VBA教程:SlideShowTransition属性 PowerPoint VBA教程:SlideShowWindow属性
PowerPoint VBA教程:SlideShowWindows属性 PowerPoint VBA教程:SlideSize属性
PowerPoint VBA教程:SlideWidth属性 PowerPoint VBA教程:Smooth属性
PowerPoint VBA教程:SmoothEnd属性 PowerPoint VBA教程:SmoothStart属性
PowerPoint VBA教程:SnapToGrid属性 PowerPoint VBA教程:SoundEffect属性
PowerPoint VBA教程:SourceFullName属性 PowerPoint VBA教程:SourceType属性
版权所有 © 中山市飞娥软件工作室 证书:粤ICP备09170368号