Please Help me with this.
Having incomplete knowledge of process is creating huge problem and waste of time.
Code:
Sub BrokenImg()
Application.ScreenUpdating = False
Dim StrTxt As String, HttpReq As Object, i As Long
Set HttpReq = CreateObject("Microsoft.XMLHTTP")
Set rng1 = ActiveDocument.Range
With rng1
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "^g"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchWildcards = False
.Execute
End With
Do While .Find.Found
Set rng2 = ActiveDocument.Range(rng1.End, ActiveDocument.Range.End)
If .Hyperlinks.Count > 0 Then
s = .Hyperlinks(1).Address
MsgBox s
If InStr(s, "about") = 1 Then
s = Replace(.Hyperlinks(1).Address, "about", "https")
MsgBox s
rng2.InlineShapes.AddPicture FileName:= _
s _
, LinkToFile:=False, SaveWithDocument:=True
End If
End If
End With
Set rng2 = Nothing
.Collapse wdCollapseEnd
.Find.Execute
Loop
End With
Set rng1 = Nothing
End Sub
In this code, inserting starts at whenever selection is followed by .found. How to start inserting at .found.
Document is at:
https://sites.google.com/site/rtsk2015/fo
https://sites.google.com/site/rtsk20...edirects=0&d=1