TPE
Tavvafi@gmail.com |
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
For example, if you record yourself moving something, you'll get:
With ActiveWindow.Selection.ShapeRange ' do something here to change coordinates End With
To make it work in slide show view, you need to know the object's name. Select it in normal view, then run this macro to learn its name:
With ActiveWindow.Selection.ShapeRange(1) MsgBox .Name End With
The names PowerPoint gives shapes aren't very helpful, so you might want to create your own names. That's equally simple:
With ActiveWindow.Selection.ShapeRange(1) .Name = "Type a name you like here" End With
Once you know an object's name, you can get at it in slide show view:
Sub MoveItInSlideShow() With SlideshowWindows(1).Presentation.Slides(1).Shapes("MyThing") ' Do whatever you like with it End with End Sub
Note: don't forget to change .Slides(#) to the appropriate slide number above.
Now you can assign the object's Action setting to Run Macro, and choose MoveItInSlideShow and you're in business.
Or even better ... if you write your macro like this, you can assign it to any shape as an action setting; PowerPoint will hand the macro a "reference" to the shape when you click it in slide show view. The macro automatically knows what shape was clicked, no matter what its name is or what slide it's on: For example, this will move the clicked shape down and to the right by 1" (72 points) each time you click the shape in slide show view.
Sub MoveAnyShapeInSlideShow(oSh as Shape) With oSh .Left = .Left + 72 .Top = .Top + 72 End With End Sub