FUNCTION SaveAllImages LPARAMETER loDocument, lcRelFolder IF !DIRECTORY(lcRelFolder) MD (lcRelFolder) ENDIF * loHttp = CREATEOBJECT("wwHTTP") loImages = loDocument.Images FOR EACH loImage in loImages lcSource = loImage.src * lcImgBinary = loHttp.HttpGet(lcSource) lcImgBinary = XmlHttp(lcSource) STRTOFILE(lcImgBinary,lcRelFolder + "\" + JustFname(lcSource) ) ENDFOR ************************************************************************ FUNCTION XMLHttp **************************************** *** Function: Returns HTTP response from a URL as a string *** Pass: *** Return: ************************************************************************ LPARAMETERS lcUrl, lcPostBuffer, lcUsername, lcPassword, lcContentType LOCAL lcVerb, llResult, lcResponse IF EMPTY(lcPostBuffer) lcPostBuffer = "" ENDIF IF EMPTY(lcUsername) lcUsername = "" lcPassword = "" ENDIF lcVerb = "GET" IF !EMPTY(lcPostBuffer) lcVerb = "POST" IF EMPTY(lcContentType) IF (lcPostBuffer = "<?") lcContentType = "text/xml" ELSE lcContentType = "application/x-www-form-urlencoded" ENDIF ENDIF ENDIF LOCAL loHttp as MSXML2.XMLHTTP loHttp = CREATEOBJECT("MSXML2.XMLHTTP") TRY loHttp.Open(lcVerb,lcUrl,.f.,lcUsername,lcPassword) IF !EMPTY(lcContentType) loHttp.setRequestHeader("Content-type",lcContentType) ENDIF loHttp.Send(lcPostBuffer) IF VERSION(5) > 800 lcResponse = CAST( loHTTP.responseBody as M ) ELSE lcResponse = loHTTP.responseBody ENDIF CATCH AERROR(laErrors) lcResponse = "Error: " + laErrors[3] ENDTRY RETURN lcResponseNote that this will work only if the images linked are indeed HTTP links. If you have FTP links or local file links this code will break. More logic is needed to determine which protocol is used and based on that you could then grab the files with other protocols.