Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    chennai
    Posts
    25

    Unanswered: how to read .DOC file

    hi all,

    i am searching a word in all files in a particular directory.
    that directory has full of document (.doc) files.
    i want to read all the files using FSO..
    could any one give me the solution plz....
    give me the code for reading doc file ...


    thanx
    Sakthi

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    108
    Not sure how to read the actual file, but I can tell you how to get a list of all the files:

    '------------------------------------------------------------------------
    ' List Files on the server.
    '------------------------------------------------------------------------
    dim fso, folder, files, file
    dim intTotalFiles
    dim strDir
    strDir = "\\Mysever\Mypath\"
    '-----------------------------------------------
    ' Files Location
    '-----------------------------------------------
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set folder = fso.GetFolder(strDir)
    Set files = folder.Files
    '-----------------------------------------------
    ' Look at each file
    '-----------------------------------------------
    intTotalFiles = 0
    For Each file in Files
    intTotalFiles = intTotalFiles +1
    response.write(file.Name) '--filename
    response.write(file.DateLastModified) '-datelastmodified
    Next
    '-----------------------------------------------
    ' Cleanout objects
    '-----------------------------------------------
    Set files = nothing
    Set file = Nothing
    Set fso = Nothing
    That should get you halfway there.

  3. #3
    Join Date
    Mar 2004
    Location
    chennai
    Posts
    25
    hi ,

    i need the coding for,
    how to read .doc file using asp...


    is there any other way to read .doc file?

    plz any one give me the solution.....

    thanx
    Sakthi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •