I use the following macro to scan a Word document for hyperlinks which point to JPG photos on the net. The maco opens the file in a separate window after which I manually copy the photo to a disk drive. The macro also changes the hyperlink to point to the local disk.
My Question: Is there code that will copy the file to the disk directly? This would be similar to "save target as" in a htlm application.
[VBA]
Sub savetarget()
For Each aHL In ActiveDocument.Hyperlinks
aa = aHL.Address
sp = Len(aa): While Mid$(aa, sp, 1) <> "/"
sp = sp - 1: Wend
aa1 = Mid$(aa, sp + 1)
ActiveDocument.FollowHyperlink Address:=aa
aHL.Address = aa1
Next aHL
End Sub
[/VBA]