K
Ker_01
Friends-
Using XL2003 on WinXP. The workbook is local, the URLs are corporate
intranet (in a different state). Searched with Google, but she showed me no
love.
Using the code below, I am cycling through a large number of pages
(thousands) on our corporate intranet. Unfortunately, I keep getting the
error:
[Run-time error '-2147012894(80072ee2)' The operation timed out] part way
through my looping after seemingly random numbers of URLs (as far as I can
tell, it changes each time) so I'm assuming the problem isn't the code or
the URL, but my ability to maintain a good connection with the server.
If AllPages(ProcessRegEx) <> "" Then
Application.StatusBar = ProcessRegEx & " of " & UsedAllPages
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
URL = AllPages(ProcessRegEx)
objHTTP.Open "GET", URL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible;
MSIE 6.0; Windows NT 5.0)"
objHTTP.send ("") '<<< where it dies
SourceHTMLText = objHTTP.responseText
Is there a way to either force the timeout to be longer, or keep retrying
until it gets the page? Alternatively I might explore using On Error Resume
Next, then just come back and try to manually re-run the ones that are
missing...but I'd rather automate it completely in case I have to hand this
off to someone else to run in the future.
Thanks!
Keith
Using XL2003 on WinXP. The workbook is local, the URLs are corporate
intranet (in a different state). Searched with Google, but she showed me no
love.
Using the code below, I am cycling through a large number of pages
(thousands) on our corporate intranet. Unfortunately, I keep getting the
error:
[Run-time error '-2147012894(80072ee2)' The operation timed out] part way
through my looping after seemingly random numbers of URLs (as far as I can
tell, it changes each time) so I'm assuming the problem isn't the code or
the URL, but my ability to maintain a good connection with the server.
If AllPages(ProcessRegEx) <> "" Then
Application.StatusBar = ProcessRegEx & " of " & UsedAllPages
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
URL = AllPages(ProcessRegEx)
objHTTP.Open "GET", URL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible;
MSIE 6.0; Windows NT 5.0)"
objHTTP.send ("") '<<< where it dies
SourceHTMLText = objHTTP.responseText
Is there a way to either force the timeout to be longer, or keep retrying
until it gets the page? Alternatively I might explore using On Error Resume
Next, then just come back and try to manually re-run the ones that are
missing...but I'd rather automate it completely in case I have to hand this
off to someone else to run in the future.
Thanks!
Keith