Nov 20, 2009

Adding Comma To End Of Line & Concatenating Lines

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > Software > Business & Productivity

Adding Comma To End Of Line & Concatenating Lines

WeaponX
I have a huge word document that I want to be able to add a comma to the end of each line and then concatenate the whole document together. For example:

test
testing 1
test 23 4


I want that to be something like:

test,testing 1,test 23 4


I tried doing this using a macro (not very good at), but couldn't get them to come out right. Basically I want to make sure that each line connects to the previous one followed by a comma at the end. My document so far has over 4,300 lines now and growing.

Any VBA experts out there or does anyone else know of an easier way to do this?

Thanks.

Comment/Reply (w/o sign-up)

calixt
QUOTE (WeaponX @ Aug 14 2005, 02:37 PM)
I have a huge word document that I want to be able to add a comma to the end of each line and then concatenate the whole document together.  For example:

*

WeaponX,
have you tried replacing paragraphs with commas using Edit->Replace?
To search for a paragraph mark, write "^p" into the input field
(at least, it's like that in my German Word-version).
Calixt

Comment/Reply (w/o sign-up)

WeaponX
Thanks Calixt, I never thought of that before. That will connect all of those lines together? How about the commas? Any easy way to do this? So far, I'm just creating two macros:

1. One is to add a comma to the end of a line.
2. The second one is basically mimicking what I did with #1 above except I'm running it through a few pages of lines first.

Then I save the second macro and run the second macro many times so it gets to the very end.

Comment/Reply (w/o sign-up)

WeaponX
Is there a program that will allow me to have one HUGE line without any limits? I have thousands of lines of text in a Word document and I used the replacement method for paragraphs and that did part of the work. But I still have a lot of lines leftover. I want them ALL to be in one very lone single line only. Word seems to limit this and I tried using other text editors and they were about the same (still have many lines leftover).

Comment/Reply (w/o sign-up)

calixt
QUOTE (WeaponX @ Aug 20 2005, 07:45 PM)
Is there a program that will allow me to have one HUGE line without any limits?  I have thousands of lines of text in a Word document and I used the replacement method for paragraphs and that did part of the work.  But I still have a lot of lines leftover.  I want them ALL to be in one very lone single line only.  Word seems to limit this and I tried using other text editors and they were about the same (still have many lines leftover).
*

WeaponX,
I am not sure but the reason for your "leftovers" may be that not every line-break is a "paragraph". I understand that the replacement method works well but covers not all the line-breaks in your documents. Maybe there are some "manual line breaks" in your docs which do not have the field code "^p" but "^l".
A nice list of field codes you will find at http://chiron.valdosta.edu/wbfredenberger/edit.htm.

 

 

 


Comment/Reply (w/o sign-up)

(G)Ankit Jain

search for ^p and replace it with blank space and comma. For manual line breaks, replace ^l with blank space and comma

-reply by Ankit Jain

Comment/Reply (w/o sign-up)

(G)

Great!! The ^p replacement worked perfectly on my english version Word.

Thank you!!


Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : Adding Comma Amp Concatenating Lines


    Looking for adding, comma, end, line, and, concatenating, lines

See Also,

*SIMILAR VIDEOS*
Searching Video's for adding, comma, end, line, and, concatenating, lines
advertisement



Adding Comma To End Of Line & Concatenating Lines

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com