找回密码
 立即注册
搜索

RGBColor RotationEffect对象在VBA之PPT中的范例

2
回复
620
查看
[复制链接]

2

主题

8

帖子

46

幻币

一流武者

Rank: 3Rank: 3

积分
228
QQ
2017-10-15 15:58:10 显示全部楼层 |阅读模式
        一、RGBColor 对象
  代表配色方案中的一种颜色。
  如何使用RGBColor对象?
  使用 Colors 方法可返回一个 RGBColor 对象。可以将一个 RGBColor 对象赋给另一个 RGBColor 对象。可使用 RGB 属性设置或返回 RGBColor 对象的显式红-绿-蓝值(对于由 ppNotSchemeColor 和ppSchemeColorMixed 常数定义的 RGBColor 对象除外,这两个对象的 RGB 属性可被返回,但不可设置)。以下示例将当前演示文稿配色方案的背景色设为红色,并将标题颜色设为第二个配色方案中定义的标题颜色。
  With ActivePresentation.ColorSchemes
   .Item(1).Colors(ppBackground).RGB = RGB(240, 0, 0)
   .Item(1).Colors(ppTitle) = .Item(2).Colors(ppTitle)
  End With
  二、RotationEffect 对象
  代表 AnimationBehavior 对象的旋转效果。
  如何使用RotationEffect 对象?
  使用 AnimationBehavior 对象的 RotationEffect 属性返回 RotationEffect 对象。以下示例引用了给定动画动作的旋转效果。
  ActivePresentation.Slides(1).TimeLine.MainSequence.Item.Behaviors(1).RotationEffect
  使用 RotationEffect 对象的 By、From 和 To 属性影响对象的动画旋转。以下示例向第一张幻灯片添加新的形状并设置旋转动画动作。
  Dim shpNew As Shape
  Dim effNew As Effect
  Dim aniNew As AnimationBehavior
  Set shpNew = ActivePresentation.Slides(1).Shapes _
.AddShape(Type:=msoShape5pointStar, Left:=0, _
Top:=0, Width:=100, Height:=100)
  Set effNew = ActivePresentation.Slides(1).TimeLine.MainSequence _
.AddEffect(Shape:=shpNew, effectId:=msoAnimEffectCustom)
  Set aniNew = effNew.Behaviors.Add(msoAnimTypeRotation)
  With aniNew.RotationEffect
  'Rotate 270 degrees from current position
  .By = 270
  End With
  End Sub

PPT学习论坛
回复

使用道具 举报

1

主题

7

帖子

7

幻币

一流武者

Rank: 3Rank: 3

积分
229
2017-10-15 16:01:30 显示全部楼层
说的不错  
PPT学习论坛
回复 支持 反对

使用道具 举报

0

主题

11

帖子

24

幻币

一流武者

Rank: 3Rank: 3

积分
250
QQ
2017-10-17 23:58:33 显示全部楼层
嘿...反了反了,,,,  
PPT学习论坛
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册