here is some vbs code to do this.  What you will have to do is to rewrite
it into perl.  I am afraid that I don't have time to re-write it myself in
perl unless you are a paying customer.

Set objWord=CreateObject("Word.Application")
set objFSO=CreateObject("scripting.FileSystemObject")

'create the output file
CheckFolder (objFSO.getfolder("d:\sqlbol\htm")), objStream
set objDocument=nothing
set objWord=nothing


Sub CheckFolder(objCurrentFolder, objLogFile)
    
    Dim strTemp
    Dim strSearch
    Dim strOutput
    Dim objNewFolder
    Dim objFile
    Dim objStream
    
    
    strSearch = ".htm"
    
   
       For Each objFile In objCurrentFolder.Files
           strTemp = Right(objFile.Name, 4)
                If UCase(strTemp) = UCase(strSearch) Then
                    'Got one
                    strOutput = CStr(objFile.Path) 
                    wscript.echo strOutput
                    set activedoc=objWord.documents.open(strOutput)
                    activeDoc.SaveAs left(strOutput,instr(strOutput,".htm")-1)+".txt",4
                    activeDoc.Close
                    set activeDoc=Nothing                   
    
                End If
       Next

       'Recurse through all of the folders
       For Each objNewFolder In objCurrentFolder.subFolders
               CheckFolder objNewFolder, objLogFile
       Next


       
End Sub



------
You are subscribed as [email protected]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to