If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > how to read .DOC file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-12-04, 02:12
j_sakthivel j_sakthivel is offline
Registered User
 
Join Date: Mar 2004
Location: chennai
Posts: 25
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
Reply With Quote
  #2 (permalink)  
Old 04-12-04, 09:33
thele thele is offline
Registered User
 
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:

Quote:
'------------------------------------------------------------------------
' 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.
Reply With Quote
  #3 (permalink)  
Old 04-14-04, 09:09
j_sakthivel j_sakthivel is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On