Is there a way to “save as” a pdf linked by hyperlink in an excel file?











up vote
1
down vote

favorite












I am tasked with downloading hundreds of pdfs that are linked via hyperlink in a giant excel file. As of now, I click the hyperlink, which opens the file in adobe reader in internet explorer, and save the file to a folder on my computer. Is there a way to click the hyperlink within excel and "save as," instead of going through the tedious process of opening and saving each pdf, one by one? I apologize if this question seems a bit stupid or vague, I'm not tech-savvy at all!










share|improve this question


























    up vote
    1
    down vote

    favorite












    I am tasked with downloading hundreds of pdfs that are linked via hyperlink in a giant excel file. As of now, I click the hyperlink, which opens the file in adobe reader in internet explorer, and save the file to a folder on my computer. Is there a way to click the hyperlink within excel and "save as," instead of going through the tedious process of opening and saving each pdf, one by one? I apologize if this question seems a bit stupid or vague, I'm not tech-savvy at all!










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am tasked with downloading hundreds of pdfs that are linked via hyperlink in a giant excel file. As of now, I click the hyperlink, which opens the file in adobe reader in internet explorer, and save the file to a folder on my computer. Is there a way to click the hyperlink within excel and "save as," instead of going through the tedious process of opening and saving each pdf, one by one? I apologize if this question seems a bit stupid or vague, I'm not tech-savvy at all!










      share|improve this question













      I am tasked with downloading hundreds of pdfs that are linked via hyperlink in a giant excel file. As of now, I click the hyperlink, which opens the file in adobe reader in internet explorer, and save the file to a folder on my computer. Is there a way to click the hyperlink within excel and "save as," instead of going through the tedious process of opening and saving each pdf, one by one? I apologize if this question seems a bit stupid or vague, I'm not tech-savvy at all!







      microsoft-excel pdf






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 23 '14 at 16:37









      CTomas

      612




      612






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          I'll get you part way there. There isn't enough info to do it all but it would be easy to look up the rest.



          This uses vba code to do what you requested.



          Below is code from vbaexpress written by Mvidas. It takes an internet address and saves it to a local file.



          Option Explicit 
          Function SaveWebFile(ByVal vWebFile As String, ByVal vLocalFile As String) As Boolean
          Dim oXMLHTTP As Object, i As Long, vFF As Long, oResp() As Byte

          'You can also set a ref. to Microsoft XML, and Dim oXMLHTTP as MSXML2.XMLHTTP
          Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
          oXMLHTTP.Open "GET", vWebFile, False 'Open socket to get the website
          oXMLHTTP.Send 'send request

          'Wait for request to finish
          Do While oXMLHTTP.readyState <> 4
          DoEvents
          Loop

          oResp = oXMLHTTP.responseBody 'Returns the results as a byte array

          'Create local file and save results to it
          vFF = FreeFile
          If Dir(vLocalFile) <> "" Then Kill vLocalFile
          Open vLocalFile For Binary As #vFF
          Put #vFF, , oResp
          Close #vFF

          'Clear memory
          Set oXMLHTTP = Nothing
          End Function


          A macro to test it with



          Sub TestingTheCode() 
          'This will save the Google logo to your hard drive, insert it into the
          ' active spreadsheet, then delete the local file
          SaveWebFile "http://www.google.com/intl/en/images/logo.gif", "C:GoogleLogo.gif"
          ActiveSheet.Pictures.Insert "C:GoogleLogo.gif"
          Kill "C:GoogleLogo.gif"
          End Sub


          With this function you need to setup a loop and get the address from your hyperlinks



          You would need to setup a loop to go through your cells,Get the hyperlink address and run the function



          For i = 1 to lastRow
          cellAddress = Replace(Range("A" & i).Hyperlinks(1).Address, "mailto:", "")
          'Something to get the file name from the whole file name here
          SaveWebFile cellAddress, destinationFolder & filename
          Next





          share|improve this answer























          • Nice answer. Can the target web address be modified to permit login information or do the objects used in the main working function not permit this?
            – EngBIRD
            May 28 '15 at 2:40











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f787007%2fis-there-a-way-to-save-as-a-pdf-linked-by-hyperlink-in-an-excel-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          I'll get you part way there. There isn't enough info to do it all but it would be easy to look up the rest.



          This uses vba code to do what you requested.



          Below is code from vbaexpress written by Mvidas. It takes an internet address and saves it to a local file.



          Option Explicit 
          Function SaveWebFile(ByVal vWebFile As String, ByVal vLocalFile As String) As Boolean
          Dim oXMLHTTP As Object, i As Long, vFF As Long, oResp() As Byte

          'You can also set a ref. to Microsoft XML, and Dim oXMLHTTP as MSXML2.XMLHTTP
          Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
          oXMLHTTP.Open "GET", vWebFile, False 'Open socket to get the website
          oXMLHTTP.Send 'send request

          'Wait for request to finish
          Do While oXMLHTTP.readyState <> 4
          DoEvents
          Loop

          oResp = oXMLHTTP.responseBody 'Returns the results as a byte array

          'Create local file and save results to it
          vFF = FreeFile
          If Dir(vLocalFile) <> "" Then Kill vLocalFile
          Open vLocalFile For Binary As #vFF
          Put #vFF, , oResp
          Close #vFF

          'Clear memory
          Set oXMLHTTP = Nothing
          End Function


          A macro to test it with



          Sub TestingTheCode() 
          'This will save the Google logo to your hard drive, insert it into the
          ' active spreadsheet, then delete the local file
          SaveWebFile "http://www.google.com/intl/en/images/logo.gif", "C:GoogleLogo.gif"
          ActiveSheet.Pictures.Insert "C:GoogleLogo.gif"
          Kill "C:GoogleLogo.gif"
          End Sub


          With this function you need to setup a loop and get the address from your hyperlinks



          You would need to setup a loop to go through your cells,Get the hyperlink address and run the function



          For i = 1 to lastRow
          cellAddress = Replace(Range("A" & i).Hyperlinks(1).Address, "mailto:", "")
          'Something to get the file name from the whole file name here
          SaveWebFile cellAddress, destinationFolder & filename
          Next





          share|improve this answer























          • Nice answer. Can the target web address be modified to permit login information or do the objects used in the main working function not permit this?
            – EngBIRD
            May 28 '15 at 2:40















          up vote
          2
          down vote













          I'll get you part way there. There isn't enough info to do it all but it would be easy to look up the rest.



          This uses vba code to do what you requested.



          Below is code from vbaexpress written by Mvidas. It takes an internet address and saves it to a local file.



          Option Explicit 
          Function SaveWebFile(ByVal vWebFile As String, ByVal vLocalFile As String) As Boolean
          Dim oXMLHTTP As Object, i As Long, vFF As Long, oResp() As Byte

          'You can also set a ref. to Microsoft XML, and Dim oXMLHTTP as MSXML2.XMLHTTP
          Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
          oXMLHTTP.Open "GET", vWebFile, False 'Open socket to get the website
          oXMLHTTP.Send 'send request

          'Wait for request to finish
          Do While oXMLHTTP.readyState <> 4
          DoEvents
          Loop

          oResp = oXMLHTTP.responseBody 'Returns the results as a byte array

          'Create local file and save results to it
          vFF = FreeFile
          If Dir(vLocalFile) <> "" Then Kill vLocalFile
          Open vLocalFile For Binary As #vFF
          Put #vFF, , oResp
          Close #vFF

          'Clear memory
          Set oXMLHTTP = Nothing
          End Function


          A macro to test it with



          Sub TestingTheCode() 
          'This will save the Google logo to your hard drive, insert it into the
          ' active spreadsheet, then delete the local file
          SaveWebFile "http://www.google.com/intl/en/images/logo.gif", "C:GoogleLogo.gif"
          ActiveSheet.Pictures.Insert "C:GoogleLogo.gif"
          Kill "C:GoogleLogo.gif"
          End Sub


          With this function you need to setup a loop and get the address from your hyperlinks



          You would need to setup a loop to go through your cells,Get the hyperlink address and run the function



          For i = 1 to lastRow
          cellAddress = Replace(Range("A" & i).Hyperlinks(1).Address, "mailto:", "")
          'Something to get the file name from the whole file name here
          SaveWebFile cellAddress, destinationFolder & filename
          Next





          share|improve this answer























          • Nice answer. Can the target web address be modified to permit login information or do the objects used in the main working function not permit this?
            – EngBIRD
            May 28 '15 at 2:40













          up vote
          2
          down vote










          up vote
          2
          down vote









          I'll get you part way there. There isn't enough info to do it all but it would be easy to look up the rest.



          This uses vba code to do what you requested.



          Below is code from vbaexpress written by Mvidas. It takes an internet address and saves it to a local file.



          Option Explicit 
          Function SaveWebFile(ByVal vWebFile As String, ByVal vLocalFile As String) As Boolean
          Dim oXMLHTTP As Object, i As Long, vFF As Long, oResp() As Byte

          'You can also set a ref. to Microsoft XML, and Dim oXMLHTTP as MSXML2.XMLHTTP
          Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
          oXMLHTTP.Open "GET", vWebFile, False 'Open socket to get the website
          oXMLHTTP.Send 'send request

          'Wait for request to finish
          Do While oXMLHTTP.readyState <> 4
          DoEvents
          Loop

          oResp = oXMLHTTP.responseBody 'Returns the results as a byte array

          'Create local file and save results to it
          vFF = FreeFile
          If Dir(vLocalFile) <> "" Then Kill vLocalFile
          Open vLocalFile For Binary As #vFF
          Put #vFF, , oResp
          Close #vFF

          'Clear memory
          Set oXMLHTTP = Nothing
          End Function


          A macro to test it with



          Sub TestingTheCode() 
          'This will save the Google logo to your hard drive, insert it into the
          ' active spreadsheet, then delete the local file
          SaveWebFile "http://www.google.com/intl/en/images/logo.gif", "C:GoogleLogo.gif"
          ActiveSheet.Pictures.Insert "C:GoogleLogo.gif"
          Kill "C:GoogleLogo.gif"
          End Sub


          With this function you need to setup a loop and get the address from your hyperlinks



          You would need to setup a loop to go through your cells,Get the hyperlink address and run the function



          For i = 1 to lastRow
          cellAddress = Replace(Range("A" & i).Hyperlinks(1).Address, "mailto:", "")
          'Something to get the file name from the whole file name here
          SaveWebFile cellAddress, destinationFolder & filename
          Next





          share|improve this answer














          I'll get you part way there. There isn't enough info to do it all but it would be easy to look up the rest.



          This uses vba code to do what you requested.



          Below is code from vbaexpress written by Mvidas. It takes an internet address and saves it to a local file.



          Option Explicit 
          Function SaveWebFile(ByVal vWebFile As String, ByVal vLocalFile As String) As Boolean
          Dim oXMLHTTP As Object, i As Long, vFF As Long, oResp() As Byte

          'You can also set a ref. to Microsoft XML, and Dim oXMLHTTP as MSXML2.XMLHTTP
          Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP")
          oXMLHTTP.Open "GET", vWebFile, False 'Open socket to get the website
          oXMLHTTP.Send 'send request

          'Wait for request to finish
          Do While oXMLHTTP.readyState <> 4
          DoEvents
          Loop

          oResp = oXMLHTTP.responseBody 'Returns the results as a byte array

          'Create local file and save results to it
          vFF = FreeFile
          If Dir(vLocalFile) <> "" Then Kill vLocalFile
          Open vLocalFile For Binary As #vFF
          Put #vFF, , oResp
          Close #vFF

          'Clear memory
          Set oXMLHTTP = Nothing
          End Function


          A macro to test it with



          Sub TestingTheCode() 
          'This will save the Google logo to your hard drive, insert it into the
          ' active spreadsheet, then delete the local file
          SaveWebFile "http://www.google.com/intl/en/images/logo.gif", "C:GoogleLogo.gif"
          ActiveSheet.Pictures.Insert "C:GoogleLogo.gif"
          Kill "C:GoogleLogo.gif"
          End Sub


          With this function you need to setup a loop and get the address from your hyperlinks



          You would need to setup a loop to go through your cells,Get the hyperlink address and run the function



          For i = 1 to lastRow
          cellAddress = Replace(Range("A" & i).Hyperlinks(1).Address, "mailto:", "")
          'Something to get the file name from the whole file name here
          SaveWebFile cellAddress, destinationFolder & filename
          Next






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jul 23 '14 at 19:57

























          answered Jul 23 '14 at 19:46









          gtwebb

          2,7571613




          2,7571613












          • Nice answer. Can the target web address be modified to permit login information or do the objects used in the main working function not permit this?
            – EngBIRD
            May 28 '15 at 2:40


















          • Nice answer. Can the target web address be modified to permit login information or do the objects used in the main working function not permit this?
            – EngBIRD
            May 28 '15 at 2:40
















          Nice answer. Can the target web address be modified to permit login information or do the objects used in the main working function not permit this?
          – EngBIRD
          May 28 '15 at 2:40




          Nice answer. Can the target web address be modified to permit login information or do the objects used in the main working function not permit this?
          – EngBIRD
          May 28 '15 at 2:40


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f787007%2fis-there-a-way-to-save-as-a-pdf-linked-by-hyperlink-in-an-excel-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Plaza Victoria

          In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

          How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...