If there is an error then kindly post the error message.
--
Regards,
Shyam Pillai
Animation Carbon: Copy/Paste/Share animation libraries.
www.animationcarbon.com
"Munna"
news:1905BF3D-3AB8-491F-93DA-C31F1F17B7E0@microsoft.com...
>
>
> Sorry sir,My real code is given below,It properly works in powerpoint
> 2003,but shows an error message in 2007,Why so sir,I kindy need your help
> to
> solve my problem
>
>
>
> Sub RelPict()
> Dim oSlide As Slide
> Dim oShape As Shape
> Dim lPos As Long
> Dim strLink As String
> '
> ' Loop through the presentation checking each shape
> ' on each slide to see if it is a linked picture.
> '
> For Each oSlide In ActivePresentation.Slides
> For Each oShape In oSlide.Shapes
> If oShape.Type = 16 Then
> With oShape.LinkFormat
> '
> ' Search from the right hand portion of the source
> ' filename and find the first backslash "\" character.
> '
> lPos = InStrRev(.SourceFullName, "\")
> '
> ' Check to see if the link has already been modified.
> '
> If lPos <> 0 Then
> '
> ' Determine how long the filename is, by subtracting
> ' the position the "\" character was found at from
> ' the total length of the source file name.
> '
> lPos = Len(.SourceFullName) - lPos
> '
> ' Extract the filename from the source file name, then
> ' assign the filename to the source file name, turning
> ' it into a relative path.
> '
> strLink = Right(.SourceFullName, lPos)
> .SourceFullName = strLink
> End If
> End With
> End If
> Next oShape
> Next oSlide
> End Sub
>
>
> Regards
> Munna