I am using FSO to Write Lines to a Text File..
is it True whenever I write a line to a text file, it puts a Carriage return at the end of that line?
if yes then how Can I get rid of Carriage Return?

i have following file written with FSO..

HBOL20050505SKYNET          YFSY4927346525
NBOLSHSKYNET WAREHOUSE                             481 KINGS HIGHWAY                            BROOKLYN           NY11223
NBOLCNhutsko, greg                                 2619-a colby st.                             dallas             TX75204-352
DBOLBX1           SONY KDE-42XS955 42-IN HDTV Plasma WEGA™ Tele           150

and our vendor are saying the following

"You are sending a carriage return line feed at the end of each line.  We need you to send a new line or a line feed."

And this is the Sample from them..

HBOL20031001ROYAL           YFSY016164269
NBOLSHEXAMPLEACCOUNT, INC                          1234 MAIN ST                               OKEMOS             MI48864    USA
NBOLCNCAL. OFFICE FURNITURE, INC.                  1724 10TH ST.                                SACRAMENTO         CA95814    USA
SBOLYFSY20031001P126939           110916SLC
DBOLCT2           CHAIRS OR STOOLS, SUB 6                      80590S6    0000070125                                              126939
DBOLCT2           CHAIRS OR STOOLS, SUB 6                      80590S6    0000123125                                              126939
DBOLCT5           CHAIR DESKS OR COMBOS, WITH                  80540S1    0000238300  

now how can we tell where the carriage return was used, and how can I get rid of it?

Who is Participating?
rdivilbissConnect With a Mentor Commented:
WriteLine always places a carriage return at the end of the string.

Write does not.

Use fso.write (string) & vbLF to write a line with only a line feed at the end.
I had thought it added CRLF (which is a new line) so another you could do ... is just add

fso.WriteLine vbLf & (string)

But I believe rdivilbiss's comment is a better way to do it anyways
khansoulAuthor Commented:
Thanks, I had it figured already thought.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.