ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 Excel Home精品图文教程库
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
300集Office 2010微视频教程 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
楼主: weiyingde

[分享] ppt学习资料

[复制链接]

TA的精华主题

TA的得分主题

发表于 2015-12-12 10:18 | 显示全部楼层
难得的pptVBA资料!

TA的精华主题

TA的得分主题

 楼主| 发表于 2015-12-12 17:55 | 显示全部楼层
与语言相关的属性和方法
Microsoft PowerPoint Visual Basic对象模型具有与语言相关的关键字,可应用于亚洲和从右向左语言的使用。而这些与语言相关关键字的可用性则依赖于用户已选定或安装的语言支持。
与语言相关的属性和方法
下表列出了仅可用于亚洲语言或从右向左语言的属性和方法。
属性或方法        对象
AutoRotateNumbers属性
Font

FarEastLineBreakLanguage属性
Presentation

FarEastLineBreakLevel属性
Presentation

FarEastLineBreakControl属性
ParagraphFormat

HangingPunctuation属性
ParagraphFormat

LayoutDirection属性
Presentation

LtrRun方法
TextRange

NameAscii属性
Font

NameFarEast属性
Font

NameOther属性
Font

NoLineBreakAfter属性
Presentation

NoLineBreakBefore属性
Presentation

RtlRun方法
TextRange

TableDirection属性
Table

TextDirection属性
ParagraphFormat

与语言相关的参数
下表列出了可用于所有语言,但却具有一个或多个与语言相关参数的属性和方法。
属性或方法        对象
AddLabel方法
Shapes

AddTextBox方法
Shapes

Orientation属性
TextFrame

SaveAs方法
Presentation

注意  为了在 Microsoft PowerPoint 中启用与语言相关的功能,操作系统必须是能支持该特定语言的 32 位 Microsoft Windows;例如,阿拉伯语版的 Microsoft Windows 95 可以支持从右向左的语言。
新的事件
下表按字母顺序列出了在 Microsoft PowerPoint 2002 中为Application对象新增的事件。
ColorSchemeChanged
PresentationBeforeSave
SlideSelectionChanged
新的方法(按字母顺序)
下表按字母顺序列出了在 Microsoft PowerPoint 2002 中为现有对象新增的方法。
新的方法        对象
AddBaseline
Presentation
AddDiagram
Shapes
AddEffect
Sequence
AddNode
DiagramNode、DiagramNodeChildren
CanCheckIn
Presentation
CanCheckOut
Presentations
CheckIn
Presentation
CheckOut
Presentations
Clone
Designs、Sequence
CloneNode
DiagramNode
Convert
Diagram
ConvertToAfterEffect
Sequence
ConvertToAnimateBackground
Sequence
ConvertToAnimateInReverse
Sequence
ConvertToBuildLevel
Sequence
ConvertToTextUnitEffect
Sequence
DiscardConflict
Presentations
EndReview
Presentation
FindFirstAnimationFor
Sequence
FindFirstAnimationForClick
Sequence
Load
Designs
MoveAfter
Effect  
MoveBefore
Effect  
MoveNode
DiagramNode
MoveTo
Design、Effect、Slide、SlideRange
NextNode
DiagramNode
OfflineConflict
Presentations
PasteSpecial
Shapes、TextRange、View
PrevNode
DiagramNode
RemoveBaseline
Presentation
ReplaceNode
DiagramNode
ReplyWithChanges
Presentation
SendForReview
Presentation
SetCMYK
ColorFormat
SetPasswordEncryptionOptions
Presentation
SwapNode
DiagramNode
TransferChildren
DiagramNode
新的方法(按对象排序)
下表按对象名顺序列出了在 Microsoft PowerPoint 2002 中为现有对象新增的方法。
对象        新的方法
ColorFormat        SetCMYK

Design        MoveTo

Designs        Clone、Load

Diagram        Convert

DiagramNode        AddNode、CloneNode、MoveNode、NextNode、PrevNode、ReplaceNode、SwapNode、TransferChildren

DiagramNodeChildren        AddNode

Effect          MoveAfter、MoveBefore、MoveTo

Presentation        AddBaseline、CanCheckIn、CheckIn、EndReview、RemoveBaseline、ReplyWithChanges、SendForReview、SetPasswordEncryptionOptions

Presentations        CanCheckOut、CheckOut、DiscardConflict、OfflineConflict

Sequence        AddEffect、Clone,ConvertToAfterEffect、ConvertToAnimateBackground、ConvertToAnimateInReverse、ConvertToBuildLevel、ConvertToTextUnitEffect、FindFirstAnimationFor、FindFirstAnimationForClick

Shapes        AddDiagram、PasteSpecial

Slide        MoveTo

SlideRange        MoveTo

TextRange        PasteSpecial

View        PasteSpecial

TA的精华主题

TA的得分主题

 楼主| 发表于 2015-12-12 17:56 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
请访问 MSDN Online 上的Office Developer Center,以获取有关最新的 Microsoft PowerPoint 开发信息,其中包括新技术论文、下载资料、示例、产品新闻及其他信息。
下表列出了在 Microsoft PowerPoint 2002 的 Visual Basic 中新增的对象。
对象        说明
AnimationBehavior
代表动画效果、主动画序列或交互式动画序列的动作。
AnimationBehaviors
代表 AnimationBehavior对象的集合。
AnimationPoint
代表一个动画动作的单个点。
AnimationPoints
代表 PropertyEffect对象动画点的集合。
AutoCorrect
包含 Microsoft PowerPoint 中的自动更正功能属性。
ColorEffect
代表动画动作的颜色效果。
Comment
代表幻灯片或幻灯片范围上的批注。
Comments
代表演示文稿中批注的集合。
Design
代表单个幻灯片设计模板。
Designs
代表幻灯片设计模板的集合。
Diagram
代表文档中的单个图示。Diagram对象为Shapes集合的成员。

DiagramNode
代表图示中的一个节点。
DiagramNodeChildren
DiagramNode对象的集合,该集合代表图示中的子节点。
DiagramNodes
DiagramNode对象的集合,该集合代表图示中的所有节点。
Effect
动画的计时信息。
EffectInformation
包含 Effect对象的动画选项
EffectParameters
包含 Effect对象的各种动画参数,如颜色、字体、字号和方向。
MotionEffect
代表 AnimationBehavior对象的动作效果。
Options
代表 Microsoft PowerPoint 中的应用程序选项。
PropertyEffect
代表 AnimationBehavior对象的属性效果。
RotationEffect
代表 AnimationBehavior对象的旋转效果。
ScaleEffect
代表 AnimationBehavior对象的缩放效果。
Sequence
代表幻灯片交互式动画序列的 Effect对象的集合。
Sequences
代表 Sequence对象的集合。
TimeLine
包含 Master、Slide 或 SlideRange对象的动画信息。
Timing
包含动画效果的计时属性。

TA的精华主题

TA的得分主题

 楼主| 发表于 2015-12-12 17:57 | 显示全部楼层
新的属性(按字母顺序)
下表按字母顺序列出了在 Microsoft PowerPoint 2002 中为现有对象新增的属性。
新的属性        对象
Accelerate
Timing
Accumulate
AnimationBehavior
Additive
AnimationBehavior
Amount
EffectParameters
Author
Comment
AuthorIndex
Comment
AuthorInitials
Comment
AutoCorrect
Application
AutoFormat
Diagram
AutoLayout
Diagram
AutomationSecurity
Application
AutoReverse
Diagram、 Timing
Behaviors
Effect
Black
ColorFormat
BuildByLevelEffect
EffectInformation
By
ColorEffect、 RotationEffect
ByX
MotionEffect、ScaleEffect
ByY
MotionEffect、ScaleEffect
Child
Shape、ShapeRange
Children
DiagramNode
ChildShapeRange
Selection
Color1
EffectParameters
Color2
EffectParameters
ColorEffect
AnimationBehavior
Comments
Slide、SlideRange
Cyan
ColorFormat
DateTime
Comment
Decelerate
Timing
Design
Master、Slide、SlideRange
Designs
Presentation
Diagram
DiagramNode、Shape、 ShapeRange
DiagramNode
Shape、ShapeRange
Dim
EffectInformation
Direction
EffectParameters
DisplayAlerts
Addin、 Application
DisplayAutoCorrectOptions
AutoCorrect
DisplayAutoLayoutOptions
AutoCorrect
DisplayGridLines
Application
DisplayName
Effect
DisplayPasteOptions
Options
Duration
Timing
EffectInformation
Effect
EffectParameters
Effect  
EffectType
Effect
Exit
Effect
FileDialog
Application
FirstChild
DiagramNodeChildren
Formula
AnimationPoint
From
ColorEffect、PropertyEffect、RotationEffect
FromX
MotionEffect、ScaleEffect
FromY
MotionEffect、ScaleEffect
GridDistance
Presentation
HasChildShapeRange
Selection
HasDiagram
Shape、ShapeRange
HasDiagramNode
Shape、ShapeRange
HasRevisionInfo
Presentation
Id
Shape、ShapeRange
Index
Design、 Effect
Ink
ColorFormat
InsetPen
LineFormat
InteractiveSequences
TimeLine
LastChild
DiagramNodeChildren
Magenta
ColorFormat
MainSequence
TimeLine
MotionEffect
AnimationBehavior
NewPresentation
Application
Options
Application
OverPrint
ColorFormat
Paragraph
Effect
ParentGroup
Shape、ShapeRange
Password
Presentation
PasswordEncryptionAlgorithm
Presentation
PasswordEncryptionFileProperties
Presentation
PasswordEncryptionKeyLength
Presentation
PasswordEncryptionProvider
Presentation
Preserved
Design
PrintComments
PrintOptions
Property
PropertyEffect
PropertyEffect
AnimationBehavior
Relative
EffectParameters
RemovePersonalInformation
Presentation
RepeatCount
Timing
RepeatDuration
Timing
Restart
Timing
Reverse
Diagram
RewindAtEnd
Timing
Root
DiagramNode
RotationEffect
AnimationBehavior
SaveNewWebPagesAsWebArchives
DefaultWebOptions
ScaleEffect
AnimationBehavior
ShowScrollbar
SlideShowSettings
ShowStartupDialog
Application
Signatures
Presentation
Smooth
AnimationPoints
SmoothEnd
Timing
SmoothStart
Timing
SnapToGrid
Presentation
TargetBrowser
DefaultWebOptions、WebOptions
TextRangeLength
Effect
TextRangeStart
Effect  
TextShape
DiagramNode
Time
AnimationPoint
TimeLine
Master、Slide、SlideRange
Timing
AnimationBehavior、 Effect
TintAndShade
ColorFormat
To
ColorEffect、PropertyEffect、RotationEffect
ToX
MotionEffect、ScaleEffect
ToY
MotionEffect、ScaleEffect
TriggerDelayTime
Timing
TriggerShape
Timing
TriggerType
Timing
Value
AnimationPoint
WritePassword
Presentation
Yellow
ColorFormat

TA的精华主题

TA的得分主题

 楼主| 发表于 2015-12-12 17:58 | 显示全部楼层
新的属性(按对象排序)
对象        新的属性
Addin        DisplayAlerts

AnimationBehavior        Accumulate、Additive、ColorEffect、MotionEffect、PropertyEffect、RotationEffect、ScaleEffect、Timing

AnimationPoint        Formula、Time、Value

AnimationPoints        Smooth

Application        AutoCorrect、AutomationSecurity、DisplayAlerts、DisplayGridLines、FileDialog、NewPresentation、Options、ShowStartupDialog

AutoCorrect        DisplayAutoCorrectOptions、DisplayAutoLayoutOptions

ColorEffect        By、From、To

ColorFormat        Black、Cyan、Ink、Magenta、OverPrint、TintAndShade、Yellow

Comment        Author、AuthorIndex、AuthorInitials、DateTime

DefaultWebOptions        SaveNewWebPagesAsWebArchives、TargetBrowser

Design        Index、Preserved

Diagram        AutoFormat、AutoLayout、Reverse

DiagramNode        Children、Diagram、Root、TextShape

DiagramNodeChildren        FirstChild、LastChild

Effect        Behaviors、DisplayName、EffectInformation、EffectParameters、EffectType、Exit、Index、Paragraph、TextRangeLength、TextRangeStart、Timing

EffectInformation        BuildByLevelEffect、Dim

EffectParameters        Amount、Color1、Color2、Direction、Relative

LineFormat        InsetPen

Master        Design、TimeLine

MotionEffect        ByX、ByY、FromX、FromY、ToX、ToY

Options        DisplayPasteOptions

Presentation        Designs、GridDistance、HasRevisionInfo、Password、PasswordEncryptionAlgorithm、PasswordEncryptionFileProperties、PasswordEncryptionKeyLength、PasswordEncryptionProvider、RemovePersonalInformation、Signatures、SnapToGrid、WritePassword

PrintOptions        PrintComments

PropertyEffect        From、Property、To

RotationEffect        By、From、To

ScaleEffect        ByX、ByY、FromX、FromY、ToX、ToY

Selection        ChildShapeRange、HasChildShapeRange

Shape        Child、Diagram、DiagramNode、HasDiagram、HasDiagramNode、Id、ParentGroup

ShapeRange        Child、Diagram、DiagramNode、HasDiagram、HasDiagramNode、Id、ParentGroup

Slide        Comments、Design、TimeLine

SlideRange        Comments、Design、TimeLine

SlideShowSettings        ShowScrollbar

TimeLine        InteractiveSequences、MainSequence

Timing        Accelerate、AutoReverse、Decelerate、Duration、RepeatCount、RepeatDuration、Restart、RewindAtEnd、SmoothEnd、SmoothStart、TriggerDelayTime、TriggerShape、TriggerType

WebOptions        TargetBrowser

TA的精华主题

TA的得分主题

 楼主| 发表于 2015-12-12 18:01 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
OLE 程序标识符
可使用 OLE 程序标识符(有时称为 ProgID)创建自动化对象。下表列出了 ActiveX 控件、Microsoft Office 应用程序和 Microsoft Office Web 组件的 OLE 程序标识符。
ActiveX 控件
Microsoft Access
Microsoft Excel
Microsoft Graph
Microsoft Office Web 组件
Microsoft Outlook
Microsoft PowerPoint
Microsoft Word
ActiveX 控件
若要创建下表列出的 ActiveX 控件,可使用相应的 OLE 程序标识符。
创建此控件        使用此标识符
CheckBox        Forms.CheckBox.1
ComboBox        Forms.ComboBox.1
CommandButton        Forms.CommandButton.1
Frame        Forms.Frame.1
Image        Forms.Image.1
Label        Forms.Label.1
ListBox        Forms.ListBox.1
MultiPage        Forms.MultiPage.1
OptionButton        Forms.OptionButton.1
ScrollBar        Forms.ScrollBar.1
SpinButton        Forms.SpinButton.1
TabStrip        Forms.TabStrip.1
TextBox        Forms.TextBox.1
ToggleButton        Forms.ToggleButton.1
Microsoft Access
若要创建下表列出的 Microsoft Access对象,可使用相应的 OLE 程序标识符之一。如果使用没有版本号后缀的标识符,则可以在运行该宏的机器上创建在最近版本的 Access 中可用的对象。
创建此对象        使用这些标识符之一
Application        Access.Application
CurrentData        Access.CodeData、Access.CurrentData
CurrentProject        Access.CodeProject、Access.CurrentProject
DefaultWebOptions        Access.DefaultWebOptions
Microsoft Excel
若要创建下表列出的 Microsoft Excel对象,可使用相应的 OLE 程序标识符之一。如果使用无版本号后缀的标识符,则可以在运行该宏的机器上创建在最近版本的 Excel 中可用的对象。
创建此对象        使用这些标识符之一        备注
Application        Excel.Application         
Workbook        Excel.AddIn         
Workbook        Excel.Chart        返回包含两张工作表的工作簿;其中一个为图表,另一个为数据。图表工作表为当前工作表。
Workbook        Excel.Sheet        返回具有一张工作表的工作簿。
Microsoft Graph
若要创建下表列出的 Microsoft Graph对象,可使用相应的 OLE 程序标识符之一。如果使用无版本号后缀的标识符,则可以在运行该宏的机器上创建在最近版本的 Graph 中可用的对象。
创建此对象        使用这些标识符之一
Application        MSGraph.Application
Chart        MSGraph.Chart
Microsoft Office Web 组件
若要创建下表列出的 Microsoft Office Web 组件对象,可使用相应的 OLE 程序标识符之一。如果使用无版本号后缀的标识符,则可以在运行该宏的机器上创建在最近版本的 Microsoft Office Web 组件中可用的对象。
创建此对象        使用这些标识符之一
ChartSpace        OWC10.Chart
DataSourceControl        OWC10.DataSourceControl
ExpandControl        OWC.ExpandControl
PivotTable        OWC10.PivotTable
RecordNavigationControl        OWC10.RecordNavigationControl
Spreadsheet        OWC10.Spreadsheet
Microsoft Outlook
若要创建下表列出的 Microsoft Outlook对象,可使用相应的 OLE 程序标识符之一。如果使用无版本号后缀的标识符,则可以在运行该宏的机器上创建在最近版本的 Microsoft Outlook 中可用的对象。
创建此对象        使用这些标识符之一
Application        Outlook.Application
Microsoft PowerPoint
若要创建下表列出的 Microsoft PowerPoint对象,可使用相应的 OLE 程序标识符之一。如果使用无版本号后缀的标识符,则可以在运行该宏的机器上创建在最近版本的 Microsoft PowerPoint 中可用的对象。
创建此对象        使用这些标识符之一
Application        PowerPoint.Application
Microsoft Word
若要创建下表列出的 Microsoft Word对象,可使用相应的 OLE 程序标识符之一。如果使用无版本号后缀的标识符,则可以在运行该宏的机器上创建在最近版本的 Microsoft Word 中可用的对象。
创建此对象        使用这些标识符之一
Application        Word.Application
Document        Word.Document、Word.Template
Global        Word.Global

TA的精华主题

TA的得分主题

 楼主| 发表于 2015-12-12 18:02 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
Activate方法
激活指定对象。
expression.Activate
expression   必选。该表达式返回一个 DocumentWindow、Pane、OLEFormat、Application 或 SlideShowWindow对象。
VBA示例
本示例按顺序激活紧挨在活动窗口之后的文档窗口。
Windows(2).Activate
Add方法
应用于 AddIns对象的 Add方法。
返回一个AddIn对象,该对象代表一个添加到加载宏列表中的加载宏文件。
expression.Add(Filename)
expression  必选。该表达式返回一个AddIns对象。
Filename  必选。String 类型。包含要添加到加载宏列表的加载宏的文件的完整名称(包括路径名和文件扩展名)。
说明
该方法并不加载新的加载宏。必须通过设置Loaded属性以加载该加载宏。
应用于 AnimationBehaviors对象的 Add方法。
返回一个AnimationBehavior对象,该对象代表一个新的动画动作。
expression.Add(Type, Index)
expression  必选。该表达式返回一个AnimationBehaviors对象。
Type  必选。MsoAnimType 类型。动画的动作。
MsoAnimType 可以是下列 MsoAnimType 常数之一。
msoAnimTypeColor
msoAnimTypeMixed
msoAnimTypeMotion
msoAnimTypeNone
msoAnimTypeProperty
msoAnimTypeRotation
msoAnimTypeScale
Index  可选。Long 类型。关于其他动画动作的动画的放置。默认值为 -1,表示如果省略 Index参数,新的动画动作将被添加到现有动画动作的末尾。
应用于 AnimationPoints 和 Sequences对象的 Add方法。
返回一个AnimationPoint 或Sequence对象,该对象代表一个新的动画点或序列。
expression.Add(Index)
expression  必选。该表达式返回上述对象之一。
Index  可选。Long 类型。动画点或动画序列相对于其他动画点或序列的位置。默认值为 -1,表示如果省略 Index参数,新的动画点或序列将被添加到现有动画点或序列的末尾。
应用于 ColorSchemes对象的 Add方法。
将一种配色方案添加到可用配色方案集合中。返回一个ColorScheme对象,该对象代表所添加的配色方案。
expression.Add(Scheme)
expression  必选。该表达式返回一个ColorSchemes对象。
Scheme  可选。ColorScheme对象。要添加的配色方案。可以是一张幻灯片或母版中的 ColorScheme对象,或者是任何打开的演示文稿的 ColorSchemes集合中的一个对象。如果省略此参数,则采用指定演示文稿 ColorSchemes集合中的第一个 ColorScheme对象(即第一个标准配色方案)。
说明
新配色方案基于指定幻灯片或母版使用的颜色,或者一个打开的演示文稿中指定配色方案中的颜色。
ColorSchemes集合最多可以包含 16 种配色方案。如果需要向集合中添加另一配色方案但 ColorSchemes集合已满,可以使用 Delete方法删除某个现有的配色方案。
请注意,Microsoft PowerPoint 在用户界面上添加配色方案之前会自动检测重复的配色方案;但是在 Visual Basic 的过程中添加配色方案时,不会进行这样的检测。过程必须进行自检以避免添加多余的配色方案。
应用于 Columns对象的 Add方法。
向现有表格中添加一个新列。返回一个Column对象,该对象代表表格中的新列。
expression.Add(BeforeColumn)
expression  必选。返回Columns对象的表达式。
BeforeColumn  可选。Long 类型。此索引号用于指定将在其前面插入新列的表格列。此参数必须为 Long 类型,最小值是 1,最大不能超过表格中的总列数。其默认值为 -1,表示如果忽略 BeforeColumn参数,插入的新列将作为表格中的最后一列。
应用于 Comments对象的 Add方法。
返回一个Comment对象,该对象代表一个添加到幻灯片中的新批注。
expression.Add(Left, Top, Author, AuthorInitials, Text)
expression  必选。该表达式返回一个Comments对象。
Left  必选。Single 类型。批注左边缘相对于演示文稿左边缘的位置(以磅为单位)。
Top  必选。Single 类型。批注上边缘相对于演示文稿上边缘的位置(以磅为单位)。
Author  必选。String 类型。批注的作者。
AuthorInitials  必选。String 类型。作者姓名的第一个大写字母。
Text  必选。String 类型。批注文本。
应用于 Designs对象的 Add方法。
返回一个Design对象,该对象代表一个新幻灯片设计。
expression.Add(designName, Index)
expression  必选。该表达式返回一个Designs对象。
designName  必选。String 类型。设计的名称。
Index  可选。Integer 类型。设计的索引号。其默认值为 -1,表示如果省略 Index参数,新的幻灯片设计将被添加到现有幻灯片设计的末尾。
应用于 ExtraColors对象的 Add方法。
如果尚未添加某颜色,则将该种颜色添加到其他颜色中,使之在演示文稿中可用。
expression.Add(Type)
expression  必选。该表达式返回一个ExtraColors对象。
Type  必选。MsoRGBType 类型。已添加的颜色的RGB 值。
应用于 NamedSlideShows对象的 Add方法。
创建一个新的命名幻灯片放映,并将其添加到指定演示文稿的命名幻灯片放映集合中。返回代表新命名幻灯片放映的NamedSlideShow对象。
expression.Add(Name, SafeArrayOfSlideIDs)
expression  必选。该表达式返回一个NamedSlideShows对象。
Name  必选。String 类型。幻灯片放映的名称。
SafeArrayOfSlideIDs  必选。Variant 类型。包含在幻灯片放映中出现的每张幻灯片的唯一幻灯片标识符。

TA的精华主题

TA的得分主题

 楼主| 发表于 2015-12-12 18:02 | 显示全部楼层
说明
添加幻灯片放映时指定的名称就是用Run方法运行该放映时指定的参数。
应用于 Presentations对象的 Add方法。
创建一个演示文稿。返回一个代表新演示文稿的Presentation对象。
expression.Add(WithWindow)
expression  必选。该表达式返回一个Presentations集合。
WithWindow  可选。MsoTriState 类型。使用 MsoTrue 在可视窗口中创建演示文稿。
MsoTriState 可以是下列 MsoTriState 常数之一。
msoCTrue
msoFalse 新演示文稿不显示。
msoTriStateMixed
msoTriStateToggle
msoTrue 默认值。在可视窗口中创建演示文稿。
应用于 PrintRanges对象的 Add方法。
返回一个PrintRange对象,该对象代表要打印的连续幻灯片组。
expression.Add(Start, End)
expression  必选。该表达式返回一个PrintRanges对象。
Start  必选。Long 类型。要打印的幻灯片范围内的第一张幻灯片。必须小于或等于 End参数的值。
End  必选。Long 类型。要打印的幻灯片范围中的最后一张幻灯片。必须大于或等于 Start参数的值。
说明
必须将PrintOptions对象的RangeType属性设置为 ppPrintSlideRange 才能将该方法应用于 PrintRanges集合中的范围。
如果不想打印整个演示文稿,而要指定打印幻灯片的范围,则必须为每个要打印的连续幻灯片组添加一个打印范围。例如,如果要打印第一张、第三张到第五张、第八张和第九张幻灯片,必须添加三个打印范围对象。详细信息,请参阅有关此方法的示例。
使用ClearAll方法清除以前定义的打印范围。
应用于 Rows对象的 Add方法。
返回一个Row对象,该对象代表一个添加到现有表格中的新行。
expression.Add(BeforeRow)
expression  必选。该表达式返回一个Rows对象。
BeforeRow  可选。Long 类型。此索引号用于指定将在其前面插入新行的表格行)。此参数必须为整数,最小值是 1,最大不能超过表格中的总行数。其默认值为 -1,表示如果忽略 BeforeRow参数,插入的新行将作为表格中的最后一行。
应用于 Slides对象的 Add方法。
创建一张新的幻灯片,并添加到指定演示文稿中的幻灯片集合。返回一个代表新幻灯片的Slide对象。
expression.Add(Index, Layout)
expression  必选。该表达式返回一个Slides集合。
Index  必选。Long 类型。新幻灯片在 Slides集合中的索引号。此值不能超过现有幻灯片数 + 1。如果设为 1,新幻灯片将成为演示文稿的第一张幻灯片。
Layout  必选。PpSlideLayout 类型。要创建的幻灯片类型。
PpSlideLayout 可以是下列 PpSlideLayout 类型常数之一。
ppLayoutBlank
ppLayoutChart
ppLayoutChartAndText
ppLayoutClipartAndText
ppLayoutClipArtAndVerticalText
ppLayoutFourObjects
ppLayoutLargeObject
ppLayoutMediaClipAndText
ppLayoutMixed
ppLayoutObject
ppLayoutObjectAndText
ppLayoutObjectOverText
ppLayoutOrgchart
ppLayoutTable
ppLayoutText
ppLayoutTextAndChart
ppLayoutTextAndClipart
ppLayoutTextAndMediaClip
ppLayoutTextAndObject
ppLayoutTextAndTwoObjects
ppLayoutTextOverObject
ppLayoutTitle
ppLayoutTitleOnly
ppLayoutTwoColumnText
ppLayoutTwoObjectsAndText
ppLayoutTwoObjectsOverText
ppLayoutVerticalText
ppLayoutVerticalTitleAndText
ppLayoutVerticalTitleAndTextOverChart
说明
若要改变现有幻灯片的版式,请使用Layout属性。
应用于 TabStops对象的 Add方法。
为指定文本的标尺添加一个制表位。返回一个代表该制表位的TabStop对象。
expression.Add(Type, Position)
expression  必选。该表达式返回一个TabStops集合。
Type  必选。PpTabStopType 类型。指定文本与新制表位的对齐方式。
PpTabStopType 可以是下列 PpTabStopType 类型常数之一。
ppTabStopCenter
ppTabStopDecimal
ppTabStopLeft
ppTabStopMixed
ppTabStopRight
Position  必选。Single 类型。以磅为单位的新制表位的位置。
应用于 Tags对象的 Add方法。
为指定对象创建一个标记。如果标记已经存在,使用该方法将替换现有的标记值。
expression.Add(Name, Value)
expression  必选。该表达式返回一个Tags对象。
Name  必选。String 类型。新标记名称。使用“name”作为该参数的字符串以设置名称标记的值。
Value  必选。String 类型。新标记值。
说明
Tags对象包含每个标记的一对字符串:标记的名称和标记值。使用 Add方法创建一个标记,并使用Name 和Value方法返回标记的名称和值组件。
VBA示例
应用于 AddIns对象。
本示例将 MyTools.ppa 添加到加载宏列表中。
Set myAddIn = Application.AddIns.Add(FileName:="c:\my documents\mytools.ppa")
MsgBox myAddIn.Name & " has been added to the list"
应用于 ColorSchemes对象。
本示例将新的配色方案添加到当前演示文稿的标准配色方案集合中。这个新配色方案是以当前演示文稿的第二张幻灯片中使用的颜色为基础的。
With ActivePresentation
    Set newClrScheme = .Slides(2).ColorScheme
    .ColorSchemes.Add Scheme:=newClrScheme
End With
应用于 Columns对象。
本示例在表格(在第二张幻灯片上的第五个形状中)的第一列前创建一个新列。然后将新列的宽度设置为 72 磅(1 英寸)。
With ActivePresentation.Slides(2).Shapes(5).Table
    .Columns.Add(1).Width = 72
End With
应用于 NamedSlideShows对象。
本示例为当前演示文稿添加一个命名幻灯片放映 Quick Show(该放映包含第二、第七和第九个幻灯片),然后运行该幻灯片放映。
Dim qSlides(1 To 3) As Long
With ActivePresentation
    With .Slides
        qSlides(1) = .Item(2).SlideID
        qSlides(2) = .Item(7).SlideID
        qSlides(3) = .Item(9).SlideID
    End With
    With .SlideShowSettings
        .NamedSlideShows.Add Name:="Quick Show", SafeArrayOfSlideIDs:=qSlides
        .RangeType = ppShowNamedSlideShow
        .SlideShowName = "Quick Show"
        .Run
    End With
End With
应用于 Presentations对象。
本示例创建一个演示文稿,并在其中添加一张幻灯片,然后保存该演示文稿。
With Presentations.Add
    .Slides.Add Index:=1, Layout:=ppLayoutTitle
    .SaveAs "Sample"
End With
应用于 PrintRanges对象。
本示例清除所有以前定义的打印范围,然后打印当前演示文稿的第一张、第三张到第五张、第八张和第九张幻灯片。
With ActivePresentation.PrintOptions
    .RangeType = ppPrintSlideRange
    With .Ranges
        .ClearAll
        .Add Start:=1, End:=1
        .Add Start:=3, End:=5
        .Add Start:=8, End:=9
    End With
End With
ActivePresentation.PrintOut
应用于 Rows对象。
本示例在现有表格的末尾创建一个新行,并将该新行的高度设置为 54 磅(0.75 英寸)。
With ActivePresentation.Slides(2).Shapes(5).Table
    .Rows.Add.Height = 54
End With
应用于 Slides对象。
本示例在当前演示文稿的开始处添加一张包含标题占位符的幻灯片。
ActivePresentation.Slides.Add Index:=1, Layout:=ppLayoutTitleOnly
本示例在当前演示文稿的末尾添加一张空白幻灯片。
With ActivePresentation.Slides
    .Add Index:=.Count + 1, Layout:=ppLayoutBlank
End With
应用于 TabStops对象。
本示例为当前演示文稿第一张幻灯片第二个形状的文本设置位于两英寸(144 磅)处的左对齐制表位。
Application.ActivePresentation.Slides(1).Shapes(2).TextFrame _
    .Ruler.TabStops.Add Type:=ppTabStopLeft, Position:=144
应用于 Tags对象。
本示例在当前演示文稿第一张幻灯片中添加名为 Priority 的标记,并设置名称标记的值。
With Application.ActivePresentation.Slides(1).Tags
    'Sets value for name tag
    .Add Name:="Name", Value:="New Figures"
    'Adds "Priority" tag with value "Low"
    .Add Name:="Priority", Value:="Low"
End With
应用于 ExtraColors对象。
本示例将一种其他颜色添加到当前演示文稿中(如果此颜色尚未添加)。
ActivePresentation.ExtraColors.Add RGB(Red:=69, Green:=32, Blue:=155)

TA的精华主题

TA的得分主题

 楼主| 发表于 2015-12-12 18:03 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
AddBaseline方法
向演示文稿中添加一条基准线以便将来合并演示文稿时可以跟踪更改。
expression.AddBaseline(FileName)
expression  必选。该表达式返回一个Presentation对象。
FileName  可选。String类型。作为此演示文稿基准线的文件的完整路径。如果没有指定 FileName,则 expression 所代表的演示文稿将作为其自身的基准线。
说明
如果该演示文稿已具有基准线,或为已合并的作者文档,本方法将产生错误。
VBA示例
以下代码行将基准线添加到当前演示文稿中。
Sub SetBaseline()
    ActivePresentation.AddBaseline
End Sub
AddCallout方法
创建一个无边框的线形标注。返回一个代表新标注的Shape对象。
expression.AddCallout(Type, Left, Top, Width, Height)
expression  必选。该表达式返回“应用于”列表中的对象之一。
Type  必选。MsoCalloutType 类型。标注线的类型。
MsoCalloutType 可以是下列 MsoCalloutType 类型常数之一。
msoCalloutOne 可水平或垂直的单段标注线。
msoCalloutTwo 可自由旋转的单段标注线。
msoCalloutThree两段标注线。
msoCalloutThree 三段标注线。
Left  必选。Single 类型。标注边界框左边缘相对于幻灯片左边缘的位置(以磅为单位)。
Top  必选。Single 类型。标注边界框上边缘相对于幻灯片上边缘的位置(以磅为单位)。
Width  必选。Single 类型。标注的边界框的宽度(以磅为单位)。
Height  必选。Single 类型。标注的边界框的高度(以磅为单位)。
说明
通过使用AddShape方法可插入多种不同的标注。
VBA示例
本示例在 myDocument 中添加一个无边框标注(此标注带有一个可自由旋转的单段标注线),并且将标注角度设为 30 度。
Sub NewCallout()
    Dim sldOne As Slide
    Set sldOne = ActivePresentation.Slides(1)
    sldOne.Shapes.AddCallout(Type:=msoCalloutTwo, Left:=50, Top:=50, _
        Width:=200, Height:=100).Callout.Angle = msoCalloutAngle30
End Sub
AddComment方法
添加一个批注。返回一个代表新批注的Shape对象。
expression.AddComment(Left, Top, Width, Height)
expression  必选。该表达式返回一个 Shapes对象。
Left,Top  可选。Single 类型。批注边界框左上角相对于文档左上角的位置(以磅为单位)。默认情况下,批注位于文档的左上角。
Width,Height  可选。Single 类型。批注的高度和宽度,以磅为单位。默认情况下,批注的高和宽均为 100 磅。
VBA示例
本示例向myDocument 中添加包含文本“Test Comment”的批注。
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.AddComment(100, 100, 150, 150)
    .TextFrame.TextRange.Text = .TextFrame _
        .TextRange.Text + "Test Comment"
End With

TA的精华主题

TA的得分主题

 楼主| 发表于 2015-12-12 18:03 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
AddConnector方法
创建一个连接符。返回一个代表新连接符的Shape对象。添加一个连接符时,它没有连接到任何对象。使用BeginConnect 和EndConnect方法可将连接符的头和尾连接到文档中的其他形状上。
expression.AddConnector(Type, BeginX, BeginY, EndX, EndY)
expression  必选。该表达式返回“应用于”列表中的对象之一。
Type  必选。MsoConnectorType 类型。连接符的类型。
MsoConnectorType 可以是下列 MsoConnectorType 类型常数之一。
msoConnectorCurve
msoConnectorElbow
msoConnectorStraight
msoConnectorTypeMixed
BeginX  必选。Single 类型。连接符的起点相对于幻灯片左边缘的水平位置(以磅为单位)。
BeginY  必选。Single 类型。连接符的起点相对于幻灯片上边缘的垂直位置(以磅为单位)。
EndX  必选。Single 类型。连接符的终点相对于幻灯片左边缘的水平位置(以磅为单位)。
EndY  必选。Single 类型。连接符的终点相对于幻灯片上边缘的垂直位置(以磅为单位)。
说明
将一个连接符连接到某个形状时,如果必要,该连接符的长度和位置会自动调整。因此,如果要将一个连接符连接到其他形状,则与添加该连接符时指定的位置和长度无关。
VBA示例
本示例在 myDocument 中添加两个矩形,然后用曲线连接符将它们连接起来。请注意,将连接符连接到矩形上时,连接符的长度和位置会自动调整;因此,它与添加标注时指定的位置和长度是无关的(长度不能为零)。
Sub NewConnector()
    Dim shpShapes As Shapes
    Dim shpFirst As Shape
    Dim shpSecond As Shape
    Set shpShapes = ActivePresentation.Slides(1).Shapes
    Set shpFirst = shpShapes.AddShape(Type:=msoShapeRectangle, _
        Left:=100, Top:=50, Width:=200, Height:=100)
    Set shpSecond = shpShapes.AddShape(Type:=msoShapeRectangle, _
        Left:=300, Top:=300, Width:=200, Height:=100)
    With shpShapes.AddConnector(Type:=msoConnectorCurve, BeginX:=0, _
            BeginY:=0, EndX:=100, EndY:=100).ConnectorFormat
        .BeginConnect ConnectedShape:=shpFirst, ConnectionSite:=1
        .EndConnect ConnectedShape:=shpSecond, ConnectionSite:=1
        .Parent.RerouteConnections
    End With
End Sub
AddCurve方法
创建一条贝塞尔曲线。返回一个代表新曲线的Shape对象。
expression.AddCurve(SafeArrayOfPoints)
expression  必选。该表达式返回“应用于”列表中的对象之一。
SafeArrayOfPoints  必选。Variant 类型。表示一个坐标数值对数组,该数组指定曲线的顶点和控制点。指定的第一个点为起始顶点,随后的两个点为第一个贝塞尔段的控制点。然后,曲线每增加一个段,要为其指定一个顶点和两个控制点。最后指定的点为该曲线的结束顶点。请注意,必须指定 3n + 1 个点,其中 n 为曲线的段数。
VBA示例
以下示例在 myDocument 中添加一个两段的贝赛尔曲线。
Dim pts(1 To 7, 1 To 2) As Single
pts(1, 1) = 0
pts(1, 2) = 0
pts(2, 1) = 72
pts(2, 2) = 72
pts(3, 1) = 100
pts(3, 2) = 40
pts(4, 1) = 20
pts(4, 2) = 50
pts(5, 1) = 90
pts(5, 2) = 120
pts(6, 1) = 60
pts(6, 2) = 30
pts(7, 1) = 150
pts(7, 2) = 90
Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddCurve SafeArrayOfPoints:=pts
AddDiagram方法
返回一个Shape对象,该对象代表添加到幻灯片、幻灯片母版或幻灯片范围中的一个图示。
expression.AddDiagram(Type, Left, Top, Width, Height)
expression  必选。该表达式返回“应用于”列表中的对象之一。
Type  必选。MsoDiagramType 类型。图示的类型。
MsoDiagramType 可以是下列 MsoDiagramType 类型常数之一。
msoDiagramCycle 显示持续循环的过程。
msoDiagramMixed 不用于此方法。
msoDiagramOrgChart 显示层次关系。
msoDiagramPyramid 显示基于基础的关系。
msoDiagramRadial 显示核心元素的关系。
msoDiagramTarget 显示实现目标的步骤。
msoDiagramVenn 显示元素间的重叠区域。
Left  必选。Single 类型。图示画布边界框左边缘相对于页面左边缘的位置(以磅为单位)。
Top  必选。Single 类型。图示画布边界框上边缘相对于页面上边缘的位置(以磅为单位)。
Width  必选。Single 类型。图示画布的边界框的宽度(以磅为单位)。
Height  必选。Single 类型。图示画布的边界框的高度(以磅为单位)。
VBA示例
以下示例将一个带四个节点的棱锥图添加到当前演示文稿的第一张幻灯片中。
Sub CreatePyramidDiagram()
    Dim dgnNode As DiagramNode
    Dim shpDiagram As Shape
    Dim intNodes As Integer
    'Adds pyramid diagram and first child node
    Set shpDiagram = ActivePresentation.Slides(1).Shapes _
        .AddDiagram(Type:=msoDiagramPyramid, Left:=10, _
        Top:=15, Width:=400, Height:=475)
    Set dgnNode = shpDiagram.DiagramNode.Children.AddNode
    'Adds three more child nodes to pyramid diagram
    For intNodes = 1 To 3
        dgnNode.AddNode
    Next intNodes
End Sub
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-3-29 20:08 , Processed in 0.051811 second(s), 5 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表