PDA

View Full Version : Selecting all lines/connectors on slide



Twardoch1989
12-07-2015, 01:33 PM
Hi Everyone,

I´m totally new in VBA topic but I'm curious if it's possible to select all lines on the slide with a macro (only lines). I know how to do this with shapes, but with lines I have got stuck. Thanks in advance for answers and commitment.

Cheers

John Wilson
12-08-2015, 06:16 AM
Something like this maybe:


Sub getLines()

Dim oshp As Shape
Dim osld As Slide
On Error Resume Next
Set osld = ActiveWindow.Selection.SlideRange(1)
If Not osld Is Nothing Then
For Each oshp In osld.Shapes
If oshp.Type = msoLine Then oshp.Select Replace:=msoFalse
Next oshp
End If


End Sub

Twardoch1989
12-08-2015, 08:08 AM
Thanks a lot John!!!! That's what I have been searching :) I'm truly thankful :)