PowerPoint) (演示文稿对象

代表 Microsoft PowerPoint 演示文稿。

备注

Presentation 对象是 Presentations 集合的成员。 Presentations 集合包含代表 PowerPoint 中打开的演示文稿的所有 Presentation 对象。

以下示例说明如何执行下列操作:

  • 返回通过名称或索引号指定的演示文稿

  • 返回活动窗口中的演示文稿

  • 返回指定的任一文档窗口或幻灯片放映窗口中的演示文稿

示例

使用 演示文稿 (索引) (其中 index 是演示文稿的名称或索引号)返回单个 Presentation 对象。 演示文稿的名称就是其文件名,是否带文件扩展名均可,但不包含路径。 以下示例在“示例演示文稿”的开头添加一张幻灯片。

Presentations("Sample Presentation").Slides.Add 1, 1

请注意,如果同时打开了多个具有相同名称的演示文稿,则会返回集合中具有指定名称的第一个演示文稿。

使用 ActivePresentation 属性可返回活动窗口中的演示文稿。 下面的示例将保存活动演示文稿。

ActivePresentation.Save

使用 Presentation 属性返回指定文档窗口或幻灯片放映窗口中的演示文稿。 下面的示例显示第一个幻灯片反映窗口中运行的幻灯片名称。

MsgBox SlideShowWindows(1).Presentation.Name

方法

名称
AcceptAll
AddTitleMaster
AddToFavorites
ApplyTemplate
ApplyTemplate2
ApplyTheme
CanCheckIn
CheckIn
CheckInWithVersion
Close
Convert2
CreateVideo
EndReview
EnsureAllMediaUpgraded
Export
ExportAsFixedFormat
ExportAsFixedFormat2
FollowHyperlink
GetWorkflowTasks
GetWorkflowTemplates
LockServerFile
Merge
MergeWithBaseline
NewWindow
PrintOut
PublishSlides
RejectAll
RemoveDocumentInformation
Save
SaveAs
SaveCopyAs
SaveCopyAs2
SendFaxOverInternet
SetPasswordEncryptionOptions
UpdateLinks

属性

名称
Application
Broadcast
BuiltInDocumentProperties
ChartDataPointTrack
Coauthoring
ColorSchemes
CommandBars
Container
ContentTypeProperties
CreateVideoStatus
CustomDocumentProperties
CustomerData
CustomXMLParts
DefaultLanguageID
DefaultShape
Designs
DisplayComments
DocumentInspectors
DocumentLibraryVersions
EncryptionProvider
EnvelopeVisible
ExtraColors
FarEastLineBreakLanguage
FarEastLineBreakLevel
Final
Fonts
FullName
GridDistance
Guides
HandoutMaster
HasHandoutMaster
HasNotesMaster
HasTitleMaster
HasVBProject
InMergeMode
IsFullyDownloaded
LayoutDirection
名称
NoLineBreakAfter
NoLineBreakBefore
NotesMaster
PageSetup
Parent
Password
PasswordEncryptionAlgorithm
PasswordEncryptionFileProperties
PasswordEncryptionKeyLength
PasswordEncryptionProvider
Path
权限
PrintOptions
ReadOnly
ReadOnlyRecommended
RemovePersonalInformation
Research
Saved
SectionProperties
敏感度标签
ServerPolicy
SharedWorkspace
签名
SlideMaster
Slides
SlideShowSettings
SlideShowWindow
SnapToGrid
同步
Tags
TemplateName
TitleMaster
VBASigned
VBProject
Windows
WritePassword

另请参阅

PowerPoint 对象模型引用

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。