Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-16-2016, 04:03 AM
PRA007's Avatar
PRA007 PRA007 is offline How to Loop in directory to work with all files Windows 7 64bit How to Loop in directory to work with all files Office 2010 32bit
Competent Performer
How to Loop in directory to work with all files
 
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
 

Tags
vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare files in different directories, slightly different namesm, Macro doesn't loop lkpederson Word VBA 0 04-28-2015 01:32 PM
How to Loop in directory to work with all files Loop through files and Copy Table Row and Paste into Different Document spiderman1369 Word VBA 2 10-15-2014 08:30 AM
How to Loop in directory to work with all files Unlink source files when creating Church Directory with INCLUDEPICTURE JohnFinNC Mail Merge 3 09-18-2014 08:50 PM
Copy Files to a directory elmnas Word VBA 8 07-11-2014 12:07 AM
How to Loop in directory to work with all files Importing Archived .pst files does not work JoJo Outlook 2 01-27-2011 12:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft