Full Version: key code for new line in text?

From: logojohn [#1]
 11 Jul 2006
To: ALL

I get a lot of excel files for text to be put on awards.

They are usually columnized so when you save or paste into a
text only format it looks like this. But actually here it doesn't display right. There is a tab and a lot of space between the name and title.
see screen cap attached.

Kathy Helou INNER CIRCLE & GRAND 5
Gloria Mayfield Banks INNER CIRCLE & GRAND 5
Sherry Giancristoforo INNER CIRCLE & GRAND 5

I need it to look like this for it to paste properly. Just non formatted text is necessary.

Kathy Helou
INNER CIRCLE & GRAND 5
Gloria Mayfield Banks
INNER CIRCLE & GRAND 5
Sherry Giancristoforo
INNER CIRCLE & GRAND 5

I can of course do it manually but would like to use the replace all.
I can copy the spaces, actually a tab and it will find it.
But when I enter the "enter" key to put it on a new line, nothing happens. If I do it that way it removes the tab spacing but leaves it on the same line. This may seem like a minor issue but when you get several hundred on a list it takes a lot of time to manually fix it.

Is there and alt key or something else to enter to get it to push it down to a new line?

Thanks
.

From: Mike (MIKEN) [#2]
 11 Jul 2006
To: logojohn [#1] 11 Jul 2006

Great question. I'll also be looking for the answer.

EDITED: 11 Jul 2006 by MIKEN


From: Carl (CSEWELL) [#3]
 11 Jul 2006
To: ALL

Would you be totally turned off to the idea of using a VBA Macro?


code:
Public Sub ReplaceTabs()
 Dim s As Shape
 For Each s In ActivePage.FindShapes(, cdrTextShape)
  s.Text.Replace vbTab, vbCrLf, False, ReplaceAll:=True
 Next s
End Sub



Would you like me to put it in a GMS file so you can 'install it'? Is it okay if it searches ALL text on a page or do you just want it to process the currently selected text?

Oh, you could also use Word to process the text. The Search/Replace feature in Word will allow to search for TABs and replace them with CRLF (paragraph marks).

EDITED: 11 Jul 2006 by CSEWELL


From: William Desrochers (DRAKESIS) [#4]
 11 Jul 2006
To: ALL

What you do is:

Edit>
Replace>
Find what>
put you space, seeing that you want to replace a space with a alt+enter function.
Replace what>
hold down alt and type 010, release alt key.
Then click:
Replace all

only problem is that because you only have one space between every word it'll replace every space with a return carriage. You'd have to have another charactor or 2-3spaces between what you would want to break the line.


From: logojohn [#5]
 11 Jul 2006
To: William Desrochers (DRAKESIS) [#4] 11 Jul 2006

The alt and 010 doesn't register in the replace box
of note pad or word pad.

Other wise it would work. It appears as only a space in the forum message but is actually a tab that I can copy and past in the find box.

Are you using a different program for the replace text editing?

.

From: logojohn [#6]
 11 Jul 2006
To: Carl (CSEWELL) [#3] 11 Jul 2006

Will the macros work in notepad?

When I paste 2 columns from excel into Microsoft Word the column lines show up and I can't select the tab space in between to replace. The alt 010 didn't seem to register there either.

If I past into Word pad as a rtf it shows the column lines of the second column with no text.

For some reason the excel file I got from a customer won't let me save as a different file type to convert it. I have to just copy and paste.

.

From: Carl (CSEWELL) [#7]
 11 Jul 2006
To: logojohn [#6] 11 Jul 2006

quote:
Will the macros work in notepad?


No. Not as written. The macro is for CorelDraw.

Do you know how to use Paste Special in Word? Copy (Ctrl-C) the two columns from Excel and then change focus to Word. Click Edit>Past Special and then select Unformatted Text. That should paste it with tabs between the first and second column data.

In Word, when you select Edit>Replace, you'll have to use the Special box to enter the TAB character and the CRLF (paragraph mark) or use "^t" for tab (no quotes) and "^p" for the paragraph mark (CRLF). The "t" and "p" must be lower case.\

WordPad does not have the same Search/Replace that Microsoft Word has.

From: William Desrochers (DRAKESIS) [#8]
 11 Jul 2006
To: logojohn [#5] 11 Jul 2006

quote:
The alt and 010 doesn't register in the replace box of note pad or word pad.

Other wise it would work. It appears as only a space in the forum message but is actually a tab that I can copy and past in the find box.

Are you using a different program for the replace text editing?


Sorry, i meant you have have to do it in excel, and yes when you alt + 010 it will not show anything but it is there.

From: Shaddy [#9]
 11 Jul 2006
To: logojohn [#1] 11 Jul 2006

How often do you need to do this? if a bunch... you can post a specific example of the Excel file (or a screen cap might do) and the desired output. We should be able to come up with a more permanent solution. I'm just starting to delve into Corel, but I have more experience with Excel (and Access). Should be able to make something that works for you. If it's nearly the same each time, making a Corel macro that accesses the Excel file might be the way to go. That would eliminate the cutting/pasting/replacing altogether.

Or if you're more comfortable with the pasting, we could just modify an excel sheet that puts it in the right format for easier pasting.


Shaddy


From: logojohn [#10]
 11 Jul 2006
To: ALL

Ill try some of the suggestions with coreldraw.

I don't use it much for sending to the laser due to IMHO the poor
ways it manipulates text.

But if it will put the desired text on a new line I would be worth going through corel to get it done on some of the bigger files.

I don't have excel at home so can't try anything new tonight. This brings up another question. Is there a freeware or low cost partial program that will let you open excel files without dropping $800 for a program I don't use for anything else but opening customer files. I have the 1997 version that came with a new computer. I imagine it will be so outdated soon it won't even open the excel files.

I tried importing the excel files into coreldraw with the xls filter. Some paragraph boxes showed up but none of the text. What gives.
.

From: Carl (CSEWELL) [#11]
 11 Jul 2006
To: logojohn [#10] 11 Jul 2006

quote:
Is there a freeware or low cost partial program that will let you open excel files


Have you asked your customer if they'll save the files as TAB-delimited, or comma delimited files?

Open Office. http://www.openoffice.org/

free office suite
OpenOffice.org is a multiplatform and multilingual office suite and an open-source project. Compatible with all other major office suites, the product is free to download, use, and distribute. To help build the community, join us.

From: logojohn [#12]
 11 Jul 2006
To: William Desrochers (DRAKESIS) [#8] 11 Jul 2006

Isnt excel all in columns? How do you select the tab spaces that represents the change from one column to another in the text file when they are still actually in columns?

I tried the alt 010 in coreldraw replace and also the open office and it didn't work. If it did that would be the answer to the problem.

.

EDITED: 11 Jul 2006 by LOGOJOHN


From: logojohn [#13]
 11 Jul 2006
To: Carl (CSEWELL) [#11] 11 Jul 2006

Thanks for the open office link. I love freeware programs that many times work better than ones selling for hundreds.

If you were wearing a grass skirt like Chuck I would hug you. >.< 

It easily opened the xls file.

I got it pasted into coreldraw but the alt 010 doesn't work to put it on a new line. There has to be something to paste in the replace for it to work.

It was a little cumbersome to work with the text since it pasted it into a paragraph box.

Here is a cdr file downversioned ot ver 11 if anyone wants to play with it.

If you have any macros that will do the job I am game. Most files I get aren't that many lines so doing it by hand is no big deal. But when I get some big ones, sometimes with 3 or 4 changing columns, it would be nice to have a shortcut.

The names and titles don't make sense since I changed them to protect their privacy.

ps. I gave up trying to get customers to send a better type of file. Many are proficient in fancy office programs but don't have a clue when you tell them you want a simple unformatted .txt file. Go figure.

Thanks,
John

EDITED: 11 Jul 2006 by LOGOJOHN


From: William Desrochers (DRAKESIS) [#14]
 11 Jul 2006
To: logojohn [#12] 11 Jul 2006

Sorry, I probably didn't explain right. The alt 010 will work only in Excel, to do the same in other programs like word, or open office you need to replace the alt 010 step with ^t or ^p.

is it possible to post part of the file, it'd would be easier to see exactly what your looking at, to explain a good solution.


From: Shaddy [#15]
 11 Jul 2006
To: logojohn [#13] 11 Jul 2006

Seeing the original Excel sheet is needed to help make it automated, but to do it yourself using the Find and Replace method in Corel (at least in X3)...

Search For: <Tab>
Replace With: <Hard Return>

make sure to include the <>

Shaddy


From: logojohn [#16]
 11 Jul 2006
To: William Desrochers (DRAKESIS) [#14] 11 Jul 2006

Here is the open office file.
When I tried the ^t or p it just replaced it with that text.
I must be doing something incredibly stupid.

,

From: logojohn [#17]
 11 Jul 2006
To: Shaddy [#15] 11 Jul 2006

quote:
Search For: <Tab>
Replace With: <Hard Return>


That does work great in coreldraw.
A great improvement. Thanks.
Well worth going through coreldraw for larger files.
Would be even better if something similar would work
with notepad or other simple text editor.

.

From: William Desrochers (DRAKESIS) [#18]
 11 Jul 2006
To: logojohn [#17] 15 Jul 2006

Sorry John, I don't have openoffice install, i'll have to take a look at work.

If your looking for an "advance" simple text editor take a look at NoteTab Lite http://www.notetab.com/, its freeware, and my fav editor.

I love it especially for its replace feature, as I can have multiple files open, and can find & replace, in all documents.

From: Carl (CSEWELL) [#19]
 12 Jul 2006
To: logojohn [#13] 15 Jul 2006

quote:
If you have any macros that will do the job I am game.


I've attached the ReplaceTabs macro. It ran without problems on your CDR file with CorelDraw version 12.

Exit CorelDraw and copy the GMS file into the GMS folder under the installation directory for CorelDraw. It should look something like this:

\Program Files\Corel\Corel Graphics 12\Draw\GMS

Start CorelDraw and open your CDR file that has the text. Select the paragraph text that you want to replace TABS with CR/LF. Select Tools>Visual Basic> Play and you will get a pop-up window. Towards the bottom of that window you'll see Macros In. Select the arrow down next to that text box. Look for and select "ReplaceTabs(ReplaceTabs.gms). Start ReplaceTabs should be put in the main text box. Click on Run and observe.

If you'd like to add the macro as a command button on your toolbar, let me know and I'll send you instructions for doing so.

From: Pedaler (ROYBREWER) [#20]
 12 Jul 2006
To: logojohn [#1] 15 Jul 2006

John,

Are you aware that you can take a tab delimited file from Excel directly into Corel's Print Merge(Corel 10 and higher)? I understand, of course, that you'd still have to fight with Corel's inability to autocondense.

Do you recall us talking about my MakeVARs program which, among other things, takes comma delimited files from Excel and converts them to Xenetech format .TXT files? This has been a freeware program for several years that numerous Xenetech users have found helpful. eMail Jeanette if you'd like to fiddle with it --- no DOCs but has pretty good Windows Help file.

Show messages:  1-20  21-33

Back to thread list | Login

© 2024 Project Beehive Forum