Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

reading files in array

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Maga Circe - 16 Sep 2006 11:36 GMT
i use this code for importing a file csv into an array

       Do While Not EOF(1)
              i = i + 1
              Line Input #1, cRecord
                     tRec = Split(cRecord, ",")
                       for j = 1 to 5
                           tRin(i, j) = tRec(j)
                       next
       Loop

can i use the code

Set fs = CreateObject("Scripting.filesystemobject")
Set ts = fs.GetFile(strFile).OpenAsTextStream(1, -2)
            strTable = ts.readall

amd put into an array all the strTable at once?
i can do it in excel if i put a table variant and then the range.value into
it, but how in word?
Russ - 09 Oct 2006 02:24 GMT
It might be better to open it in Excel first and format and sort it there
first and then open it as a worksheet in Word.

> i use this code for importing a file csv into an array
>
[quoted text clipped - 16 lines]
> i can do it in excel if i put a table variant and then the range.value into
> it, but how in word?

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID


Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.