K
Keith R
I'm adapting some existing code, because I need to be able to make a few
notes to myself when using this macro to paste screenshots while developing
training material (to keep track of what user actions occurred right before
the screen shot, etc.). I've tried to edit it to allow the user to input
some text and paste it into the slide that was just pasted in, but it isn't
working- I get a runtime error that "selection (unknown member): invalid
request. Nothing appropriate is selected"
Can anyone help me with the syntax?
Many thanks,
Keith
Sub addslide()
Dim oSld As Slide
With ActivePresentation.Slides
Set oSld = ActiveWindow.Selection.SlideRange(1)
With .Add(oSld.SlideIndex + 1, ppLayoutTitleOnly)
.Shapes.Paste
TempComment = InputBox ("Enter your slide comments:", "Comments")
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Select '*** this
is the line it stops on
With ActiveWindow.Selection.TextRange
.Text = TempComment
End With
End With
End With
End Sub
notes to myself when using this macro to paste screenshots while developing
training material (to keep track of what user actions occurred right before
the screen shot, etc.). I've tried to edit it to allow the user to input
some text and paste it into the slide that was just pasted in, but it isn't
working- I get a runtime error that "selection (unknown member): invalid
request. Nothing appropriate is selected"
Can anyone help me with the syntax?
Many thanks,
Keith
Sub addslide()
Dim oSld As Slide
With ActivePresentation.Slides
Set oSld = ActiveWindow.Selection.SlideRange(1)
With .Add(oSld.SlideIndex + 1, ppLayoutTitleOnly)
.Shapes.Paste
TempComment = InputBox ("Enter your slide comments:", "Comments")
ActiveWindow.Selection.ShapeRange.TextFrame.TextRange.Select '*** this
is the line it stops on
With ActiveWindow.Selection.TextRange
.Text = TempComment
End With
End With
End With
End Sub