Master 对象 (PowerPoint)Master object (PowerPoint)

代表一个幻灯片母版、标题母版、讲义母版、备注母版或设计母版。Represents a slide master, title master, handout master, notes master, or design master.

示例Example

若要返回Master对象, 请使用**Slide** 对象或**SlideRange** 集合的主控形状属性, 或使用HandoutMasterNotesMasterSlideMasterTitleMaster属性的 Presentation 对象。To return a Master object, use the Masterproperty of the Slide object or SlideRange collection, or use the HandoutMaster, NotesMaster, SlideMaster, or TitleMasterproperty of the Presentation object. 请注意,其中的一些属性还可从 设计 对象也。Note that some of these properties are also available from the Design object as well. 下面的示例设置活动演示文稿的幻灯片母版的背景填充。The following example sets the background fill for the slide master for the active presentation.

ActivePresentation.SlideMaster.Background.Fill _

    .PresetGradient msoGradientHorizontal, 1, msoGradientBrass

若要向演示文稿中添加标题母版或设计, 并返回一个代表新标题母版或设计的master对象, 请使用AddTitleMaster方法。To add a title master or design to a presentation and return a Master object that represents the new title master or design, use the AddTitleMastermethod. 下面的示例在当前演示文稿添加一个标题母版,并将标题占位符放置距母版顶部 10 磅的位置。The following example adds a title master to the active presentation and places the title placeholder 10 points from the top of the master.

ActivePresentation.AddTitleMaster.Shapes.Title.Top = 10

方法Methods

名称Name
ApplyThemeApplyTheme
删除Delete

属性Properties

名称Name
ApplicationApplication
BackgroundBackground
BackgroundStyleBackgroundStyle
ColorSchemeColorScheme
CustomerDataCustomerData
CustomLayoutsCustomLayouts
设计Design
GuidesGuides
HeadersFootersHeadersFooters
HeightHeight
HyperlinksHyperlinks
名称Name
ParentParent
ShapesShapes
SlideShowTransitionSlideShowTransition
TextStylesTextStyles
ThemeTheme
TimeLineTimeLine
WidthWidth

另请参阅See also

PowerPoint 对象模型引用PowerPoint Object Model Reference

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.