如何增加形状微调的大小在PowerPoint VBA每个新滑板?

此代码创建的10滑动,其中,每个下一幻灯片的2形状(1号和3)的轻推相对于在之前的幻灯片类似的形状有点串,同时一个形状(数2)保持在相同的位置在整个。

每个微调等于2点(像素),但我不知道我怎么能修改此代码,以便每次微调将大于前一个接一个点。 例如,微移用于创建幻灯片2将是2分,但微移用于幻灯片3将3点等

Sub MovingFlanks() Dim oPresentation As Presentation Set oPresentation = ActivePresentation Dim oSlide As Slide Dim oSlides As SlideRange Dim oShape As Shape Dim slideNumber As Integer For slideNumber = 1 To 10 Set oSlide = oPresentation.Slides(oPresentation.Slides.Count) oSlide.Copy Set oNewSlides = oPresentation.Slides.Paste() Set oSlide = oNewSlides(1) Set oShape = oSlide.Shapes(1) For Each shapeNum In Array(1, 3) Set oShape = oSlide.Shapes(shapeNum) oShape.Left = oShape.Left + 2 Next shapeNum Next slideNumber End Sub

--------------解决方案-------------

只需更换:

oShape.Left = oShape.Left + 2

...有:

oShape.Left = oShape.Left + slideNumber

(虽然你可能想使用slideNumber * 10,使之明显)。

分类:幻灯片 时间:2015-03-15 人气:0
本文关键词: 简报,简报VBA
分享到:

相关文章

Copyright (C) 55228885.com, All Rights Reserved.

55228885 版权所有 京ICP备15002868号

processed in 0.738 (s). 10 q(s)