Mass Hypelink Download

  • We have a system which is used for document management, the server address is constant. The only thing that changes is the document Name/number. I have extracted a list of document numbers and concatenated them together with the server address. From the concatenated cells I have created a list of hyper links to the documents. I would now like to save the target of the hyperlinks to a directory on a local disk. Is this possible with VB code?


    Any help would be much appreciated, I've been trying for 2 weeks to figure out a way to do this. There are around 2000 hyperlinks to save the target of meaning a manual approach is impossible.


    Thanks


    Dave Jackson

  • Re: Mass Hypelink Download


    Yes thats correct. I would normally use a mass download client, but as we are on a corporate network I can not install any 3rd party software.

  • Re: Mass Hypelink Download


    I'm testing it with "http://www.dkvinyls.co.uk/proq12345678.txt" I have read/write permissions. I can't use the actual URL as i'm at home so no access to the network at the moment.

  • Re: Mass Hypelink Download


    I see what you mean, I don't have access in that way. If I did I could just copy the files. Sorry for the confusion.

  • Re: Mass Hypelink Download


    Try this code from a previous post
    http://www.ozgrid.com/forum/showthread.php?t=15012


    [vba]
    Sub GetXLs()
    Dim WebUrlStr As String, LocalFile As String
    Dim oXMLHTTP As Object, bArray() As Byte, hfile As Integer
    Dim tempWb As Workbook, newWb As Workbook
    Dim MyRange As Range

    Application.ScreenUpdating = False
    Set oXMLHTTP = CreateObject("Microsoft.XMLHTTP")

    'download the file from the web to the hardrive
    WebUrlStr = "http://www.dkvinyls.co.uk/proq12345678.txt"
    LocalFile = "c:\temp\test.txt"
    oXMLHTTP.Open "GET", WebUrlStr, False
    oXMLHTTP.send
    bArray = oXMLHTTP.ResponseBody
    hfile = 1
    Open LocalFile For Binary As #hfile
    Put #hfile, , bArray
    Close #hfile

    Application.ScreenUpdating = True

    Set oXMLHTTP = Nothing
    End Sub


    [/vba]

    [h4]Cheers
    Andy
    [/h4]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!