SGvagon

Poslech klíč Makra Module 3

Jun 6th, 2022 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. 'All these procedures run in Edit or Normal View, not SlideShow View
  2.  
  3. 'Select one and only one shape and get the name of that shape
  4. Sub GetShapeName()
  5. MsgBox ActiveWindow.Selection.ShapeRange.Name
  6. End Sub
  7.  
  8. 'Select one and only one shape and set the name of that shape
  9. Sub SetShapeName()
  10. Dim shapeName As String
  11.  
  12. shapeName = InputBox(prompt:="Type a name for the shape")
  13. ActiveWindow.Selection.ShapeRange.Name = shapeName
  14. End Sub
  15.  
  16. 'Get the namne of the current slide
  17. Sub GetSlideName()
  18. MsgBox ActiveWindow.View.Slide.Name
  19. End Sub
  20.  
  21. 'Set the name of the current slide
  22. Sub SetSlideName()
  23. Dim slideName As String
  24.  
  25. slideName = InputBox(prompt:="Type a name for the slide")
  26. ActiveWindow.View.Slide.Name = slideName
  27. End Sub
Advertisement
Add Comment
Please, Sign In to add comment