Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Input Files and Quotation Marks

Status
Not open for further replies.

penguin321

Programmer
Sep 20, 2001
7
US
I am trying to combine a number of text files into one file using Microsoft Access. I am looping through the files and using Input and Output files to read each line and send it to the new file. I am also checking each line to look for certain key tags so that I can only send portions of the source document to my new file. This works pretty well, except that there are some double quotes in the source files which are not making their way to the destination file. I can understand why this would happen, but is there any way to get around it? I've tried replace the quotes with escape characters, and that didn't work. any help would be appreciated. Thanks.


Here's a snippet of my code:
Dim i As Integer
Dim strLine As String

Debug.Print "START"

i = 1
Open "C:/full.txt" For Output As #2


Do Until i = 667
Open "C:/Source Documents/" & Format(i, "000") & ".txt" For Input As #1
Debug.Print "Reading File " & Format(i, "000") & ".txt"
Input #1, strLine
Do Until strLine = &quot;<h2><B>&quot;
Input #1, strLine
Loop
Input #1, strLine
Do Until strLine = &quot;</h2></B>&quot;
Print #2, strLine
Input #1, strLine
Loop
continue_reading:
Close #1
i = i + 1
Loop
 
penquin,
Have you tried replacing the double-quotes with double-double-quotes?
--Jim
 
Jim,
Yeah, I did try that. It didn't help. Thanks, though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top