Posted on 2005-05-05
Medium Priority
Last Modified: 2012-06-27
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?

Question by:khansoul
LVL 29

Accepted Solution

rdivilbiss earned 600 total points
ID: 13941074
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.
LVL 10

Expert Comment

ID: 13945003
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

Author Comment

ID: 13946345
Thanks, I had it figured already thought.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question