Header
PowerPoint tips, hints and tutorials that will change your presentations for ever!

INDEX

 

Jigsaws
Sounds
Video
Custom Shows
vba code
NaviSlides
Games for teachers
Bullets
Triggers
Security
Flash Cards
Multiple Instances
PowerPoint 2007
Mail Merge
Random events
Animation
Hyperlinks
Set spellcheck language


Home buttonTutorial buttonContact buttonProducts button

Connectors to Lines 2003

If you open a presentation created in later version with powerPoint 2003 you may find that the "lines" are now connectors. This is the default in later versions. Not a great idea in my opinion but ...

This code can be used in 2003 to convert the connectors back to lines. Don't use it in later versions as the new lines will be connectors too.

ALWAYS USE A COPY in case something unexpected happens!

Sub fixConnector() 
    Dim osld As Slide 
    Dim oshp As Shape 
    Dim sngX1 As Single 
    Dim sngX2 As Single 
    Dim sngY1 As Single 
    Dim sngY2 As Single 
    Dim newLine As Shape 
    Dim i As Integer 
    For Each osld In ActivePresentation.Slides 
        For i = osld.Shapes.Count To 1 Step -1 
            Set oshp = osld.Shapes(i) 
            If oshp.Connector = True Then 
                If oshp.HorizontalFlip Then 
                    sngX1 = oshp.Left + oshp.Width 
                    sngX1 = oshp.Left 
                Else 
                    sngX1 = oshp.Left 
                    sngX2 = oshp.Left + oshp.Width 
                End If 
                 
                If oshp.VerticalFlip Then 
                    sngY1 = oshp.Top + oshp.Height 
                    sngY2 = oshp.Top 
                Else 
                    sngY1 = oshp.Top 
                    sngY2 = oshp.Top + oshp.Height 
                End If 
                Set newLine = osld.Shapes.AddLine(sngX1, sngY1, sngX2, sngY2) 
                oshp.Delete 
            End If 
        Next i 
    Next osld 
End Sub 

How to use code

 

 

 

Back to the Index Page

POWERPOINT BLOG

Articles on your favourite sport

Free Microsoft PowerPoint Advice, help and tutorials, Template Links
This website is sponsored by Technology Trish Ltd
© Technology Trish 2007
Registered in England and Wales No.5780175
PowerPoint® is a registered trademark of the Microsoft Corporation