Loop through links and download PDF's

后端 未结 1 616
北恋
北恋 2021-01-26 19:31

I have a code that has been here for a while with different types of questions. This is getting closer to it\'s final version. However now I have a problem that there is mistake

相关标签:
1条回答
  • 2021-01-26 20:23

    I would add a If Len(sLink) > 0 check before calling the HTTP GET.

    The problem is with this line:

    sLinks = sLinks & internetinnerlink.href & vbCrLf

    It will add an extra vbCrLf at the end of the sLinks list. It should be:

    If sLinks <> "" Then sLinks = sLinks & vbCrLf
    sLinks = sLinks & internetinnerlink.href
    

    This way there won't be a vbCrLf after the last link

    0 讨论(0)
提交回复
热议问题