Full Version: key code for new line in text?

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.

From: Pedaler (ROYBREWER) [#21]
 12 Jul 2006
To: logojohn [#1] 16 Jul 2006

John,

I should have also said that I developed a "freebie" Excel add in that already does exactly what you want, but you'd have to have Excel to make it work.

I am not an expert @ Excel, but I think even the Office97 version will still open up current .XLS files and my add in was originally created in 97 and has been tested through Office2003.

[[[ for the uninitiated, an Excel Add In is just a macro that is easier to install and explain than a macro]]]]

From: logojohn [#22]
 15 Jul 2006
To: Carl (CSEWELL) [#19] 16 Jul 2006

Thanks a lot.
It was easy to install and it worked great with x3.
I like that you can select what you want it to work on in case you have
other things on the page you want to ignore.
By opening the excel file in open office and pasting into coreldraw, it lets me do it at home or on more than the one computer that has excel on it at work.

For occassional use without installing the macro, the
Search For: <Tab>
Replace With: <Hard Return>
also worked well after pasting the text into coreldraw.
I got a blank text box when importing the excel file directly into x3.

I am also going to pursue Roys suggestions as it is best to have several options. The Office 97 suite with excel has opened all the excel files I have gotten so far. It is on an XP computer that is working fine now. But I tried to move it by reinstalling from the original disk to a newer XP computer. I got some kind of message saying it wasn't compatible. But the computer it is on should have a few years of life left.

Do you or Shaddy have other useful macros ready to go? People haven't expressed much interest but maybe they will realize the potential later on. I am guilty of ignoring posts about macros from awhile back. It was just one more thing to find time to do. I didn't realize how much time they could save for some things and how easy they are to install and run. Here are some links to pages that were posted earlier.
http://www.isocalc.com/cooltools/index.htm
http://www.oberonplace.com/vba/drawmacros/index.htm

Did you ever develop one to replace the print merge? It would be nice to have the result in corel draw where you could edit it instead of just at the print output.

If it isn't too complex, it would help to have the command button on the toolbar.

.

EDITED: 16 Jul 2006 by LOGOJOHN


From: Carl (CSEWELL) [#23]
 16 Jul 2006
To: logojohn [#22] 23 Jul 2006

quote:
Did you ever develop one to replace the print merge?


Yes, a very preliminary one. It will read one name per line of a text file and let you specify the horizontal (X) and vertical (Y) separation distance between each name. It will allow you to place the longest name into the currently selected text so that you can size the 'original' for the longest name. I think it can be easily expanded to handle multiple data fields (tab or comma delimited, or one field per line), but it will take some time and motivation. Right now, it does what I need it to do. It should be possible to ensure that each data field fits within a certain specific size, if need be. The options are pretty much endless. It just depends on what you need and how often you would re-use it. I think Shaddy is also working on a Print Merge.

I have a CopyXY which array copies selected objects. I think X3 now has this feature. I use this one just about every day. You specify the X and Y offsets and the number of rows and columns and it copies the objects for you. Oberon has a "tiler" macro that does something similar. I developed CopyXY as a stepping stone to the Print Merge. In fact, I used the code from CopyXY for the preliminary version of my Print Merge. A radial version would also be helpful (layouts for dials, clocks, or whatever). Yes, the same thing can be done with Transformations, the "+" key, and ......, but the macro, in my humble opinion, is far simpler and far quicker than the others. I guess that's why Corel finally decided to add such a command.

There's a few others that work mainly on layers. I tend to work with a lot of layers (Objects, Text, Notes, Laser Settings, Company specific runs, Variations, etc) so they are handy for me. I also do graphic work (vector conversions mainly) for local companies and the use of layers is extremely powerful when you're working with large EPS files, or color separations. I can also put alernatives on different layers so my customers can easily pick and choose.

I also created one that saves the current file to a previous CorelDraw version and adds a suffix to the filename (MyFile-v7.CDR, for example) so I know the file version without opening the file. This might be useful for people that are using X3 and 12, or a lower version. I use it a LOT because I have several clients that are still using lower versions of CorelDraw (7 and 8!) and I got tired of going over there with a version 12 file and not being able to open it! In case you haven't done it, you have to go through a save as and then remember to pick the version number. CorelDraw defaults to the highest version. Oh, if you ever need to figure out the version of a CorelDraw file, open the CDR file with NotePad and you can see the file version on the first line. It will look something like: CDR7vrs.

quote:
If it isn't too complex, it would help to have the command button on the toolbar


It's fairly straight forward and once you do it, it is fairly intuitive. To add a command button for a macro to the Toolbox toolbar:

- Right click anywhere on the toolbox toolbar and follow Customize> Toolbox Toolbar> and then click on Add a new command
- In the new window, just below the word Command (top center of the new window) is a text box with File. Click on the down arrow and find and select Macros (it's at the top of the list).
- In the text list box below, find the macro that you want to add as a command button and click on it ONCE.
- You can add a tool tip (see box to the right) under the GENERAL tab.
- Or use a shortcut key for it under the SHORTCUT KEYS tab
- Click on the Appearance tab.
- Here you can change the ICON by IMPORTing one or drawing your own!
- You may want to change the caption (above the ICON) to something simpler than what is displayed.
- Once you get all that done (and you can come back and modify this later), left click (hold down the mouse button) on the macro name in the list box (to left of the tabs section, where you first clicked on it above) and drag it to the toolbox toolbar. Or wherever you want.
- You can undo the command button by dragging it back to where you dragged it from.
- You can go back and modify the icon or tooltip without having to drag it to the toolbar again.

Let me know how this works and any problems or questions that might have or if you need a screenshot for clarification. Anyone else that wants to chime in (Shaddy?), please feel free to do so.

I've created a separate flyout specifically for macros, and also have a floating toolbar with macros and commands that I use often or that I want locally to where I'm working rather than having to go all the way over to the toolbox or property bar. You can EXPORT your whole workspace or individual toolbars. I use this to easily move customized toolbars between computers. I could probably distribute all the macros and a customized toolbar (with my generic icons) in two filetypes, the GMS (for macros) and the XMLT (I think) for toolbars.

If you haven't already, you may want to EXPORT your workspace to save it in case you have to F8. In fact, I would recommend this for anyone that has made any modifications to their workspace.

I was really hoping there was a REAL programmer lurking out there that has already done a lot of this and would be willing to contribute macros and help, but, until that person shows up, I guess I'll do what I can when I have time. Hopefully, Shaddy will continue to contribute also.

One of my computers has developed a CPU usage problem with Explorer and LSASS.EXE that I've been trying to resolve. I may have to re-install Win2K or pony-up for an upgrade to X3 since Microsoft is phasing out support and upgrades for everything but XP.

From: Shaddy [#24]
 16 Jul 2006
To: logojohn [#22] 23 Jul 2006

I'm working on something more simple than Print Merge... that's a very complicated program that I don't have the brains to mimic. What I'm working on is more basic. It's broken up into separate features... A duplicator portion that works like Oberon's Tiler (Carl pointed that out, would have saved me some time to use thiers :S ). If you rename text objects to the right name, another feature will fill in the text from an excel, access or text file. It will also have a serial number feature to increment a text field, starting from any number. I tired to keep the processes separate because you might have use for portions of it, and not want the rest.

So, it'll only be used for simple things where you don't need the full featured Merge.

I need another week or two of prettying though. Everything is still in different files and I'm combining them and making user friendly. It's a big program.

Shaddy


Show messages:  1-4  5-24  25-33

Back to thread list | Login

© 2024 Project Beehive Forum