View Single Post
 
Old 01-16-2016, 04:03 AM
PRA007's Avatar
PRA007 PRA007 is offline Windows 7 64bit Office 2010 32bit
Competent Performer
 
Join Date: Dec 2014
Location: Ahmedabad, Gujrat, India
Posts: 145
PRA007 is on a distinguished road
Default How to Loop in directory to work with all files

I am opening HTML files using following code.

Code:
Sub tester()
    Dim oFSO As Object
    Dim oFS As Object, sText As String, StrTxtT As String, StrTxtD As String, StrTxtN As String, URL As String, Rng As Range
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oFS = oFSO.OpenTextFile("C:\Users\Username\Desktop\ProStrakan, Inc. et al v. Actavis Laboratories UT, Inc. et al.html")
    Dim strSource As String
    Dim strDest As String
    Do Until oFS.AtEndOfStream
        sText = oFS.ReadAll()
do some split and replace to finally get StrTxt
My problem Here is How to read all the HTML file one by one in directory and run code.
Reply With Quote