' Get the number of images lnOccurence = oApp.Occurs(UCase(lcSearchFor), UCase(lcHtml)) ' Clear the collection oLink.Clear() ' Get all the images into the collection For lnCounter2 = 1 To lnOccurence ' Get the url of the image lnLocation = oApp.At(UCase(lcSearchFor), UCase(lcHtml), lnCounter2)It is one of them which is causing the memory issue. My best bet is that it is the first line. lcHtml comes from a MHTML conversion. I assume there is a connectivity issue which is returning a very weird string into lcHtml which would then cause such reaction.