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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

insert carriage return after asterisk in text doc

Status
Not open for further replies.

gazdag6

Technical User
Oct 7, 2006
2
US
Hi there guys, I was wondering if someone could lend me some expertise.

I have a rather large multi line file that while it should have been a single record per line limited to 512 characters, there is an asterisk and another line begins bringing the total character count to 1024. Is there a way to insert a carriage return after the asterisk or divide the lines up at the 512'th character?

This is just a plain text doc in notepad in windows. Here is a sample of where I would like to try to insert the carriage return to push it to the next line so I only have 512 characters in a single line.

*I6097546730

The asterisk is the 512th character and the I is the 513th, is there a way to create an "enter" insert or carriage return that will push the I to the next line? I have about 30k lines to do this to.

I can pull the doc into excel, access, or word, but I can not find a way to split the lines after the asterisk.

Thanks!!
 
Create a linked table to a copy of it in Access, then use an Update query to replace the contents of the field with

Replace (Fieldname, "*", "*" & vbCrLf)

Note: This is theory only, I've not had a chance to test this properly.

John
 
I will give it a shot.

Thanks for the tip!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top