#1
|
|||
|
|||
Fetch images from URLs automatically
Hi Everyone,
I have a very long document (1382 pages long) with about 2500 URLs directly put into the document (no key fields of any sort, just the plain 'http://.....' appears on the document). I want to make Word automatically fetch the pictures at the end of these URLs. I know that the key field for this is { INCLUDEPICTURE http://...}, which I can manually add by highlighting the URL, hitting CTRL F9, typing out INCLUDEPICTURE, and hitting F9 to refresh. However, doing this 2500 times is not really an option. Does anyone know of an automatic way to make Word fetch the picture from every http link? Thanks in advance! |
#2
|
||||
|
||||
Assuming they're active hyperlinks and the document contains no other hyperlinks, you could use a macro like:
Code:
Sub Demo() Application.ScreenUpdating = False Dim i As Long, Rng As Range, StrAddr As String With ActiveDocument For i = .Hyperlinks.Count To 1 Step -1 Set Rng = .Hyperlinks(i).Range StrAddr = Chr(34) & .Hyperlinks(i).Address & Chr(34) .Fields.Add Rng, Type:=wdFieldIncludePicture, Text:=StrAddr, PreserveFormatting:=False Next End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do MS Office products link to URLs? | stegraham | Office | 2 | 10-22-2013 04:52 AM |
Images stretching to margins automatically | Ulodesk | Word | 3 | 08-13-2012 10:39 AM |
URLs in citations | acappella | Word | 3 | 07-24-2012 03:28 PM |
Automatically update web images on Powerpoint | thetodd14 | PowerPoint | 0 | 05-04-2011 10:37 AM |
mailmerge with custom URLs? | guthrie | Mail Merge | 0 | 03-06-2011 08:39 PM |