View Single Post
 
Old 11-08-2018, 03:21 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Assuming the number only appears once in the link path, then Paul's code can be modified e.g.


Code:
Sub Demo()
    Application.ScreenUpdating = False
    Dim i As Long
    With ActiveDocument
        For i = .Shapes.Count To 1 Step -1
            With .Shapes(i)
                If Not .LinkFormat Is Nothing Then
                    With .LinkFormat
                        .SourceFullName = Replace(.SourceFullName, "046", "048")
                    End With
                End If
            End With
        Next
        For i = .InlineShapes.Count To 1 Step -1
            With .InlineShapes(i)
                If Not .LinkFormat Is Nothing Then
                    With .LinkFormat
                        .SourceFullName = Replace(.SourceFullName, "046", "048")
                    End With
                End If
            End With
        Next
    End With
    Application.ScreenUpdating = True
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote