adamjancz
01-05-2011, 08:52 AM
Hi again
This time, I'm trying to get hold of slides I just pasted. Everything is fine, when I step through the macro. But when I just play it, it says that there is an unknown member in the selection - looks like it pastes, but doesn't select yet and then runs the next code.
However, when I was trying to wait when ActiveWindow.selection was nothing, it didn't work.
Here's the code:
Public Sub gPaste()
Dim CurrentSlideMaster As Integer
CurrentSlideMaster = ActivePresentation.Slides(1).Design.Index
CommandBars.ExecuteMso ("PasteSourceFormatting")
ActiveWindow.Selection.SlideRange.Design = ActivePresentation.Designs(CurrentSlideMaster)
End Sub
Any thoughts?
Thanks in advance
End Sub
This time, I'm trying to get hold of slides I just pasted. Everything is fine, when I step through the macro. But when I just play it, it says that there is an unknown member in the selection - looks like it pastes, but doesn't select yet and then runs the next code.
However, when I was trying to wait when ActiveWindow.selection was nothing, it didn't work.
Here's the code:
Public Sub gPaste()
Dim CurrentSlideMaster As Integer
CurrentSlideMaster = ActivePresentation.Slides(1).Design.Index
CommandBars.ExecuteMso ("PasteSourceFormatting")
ActiveWindow.Selection.SlideRange.Design = ActivePresentation.Designs(CurrentSlideMaster)
End Sub
Any thoughts?
Thanks in advance
End Sub