Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Macro Software for sorting text?

Feb 11, 2011 4:14AM PST

I have used macro software in the past with great success to automate stuff i'm doing. Now i have a list of 300 stores i need to sort into categories. Each store has a title in bold, then a few lines of text with the number of stores, state, address, and contact info the of manager. Each block of text has anywhere from 3-7 lines so i can't just pull them based on length. I'm wondering if there is a macro program or some kind of scripting language i can write in to go to the next line that is bold (the store name is always the first line and always bold) then read how many stores it has (the second line of text is always a number followed by the word "stores"). Then copy all the text and categorize appropriately in a new word document. I know how to write code, but if i could find something with a gui it would be a lot nicer/easier. Also, i have a mac and have never used automater, is this a viable option? I have windows on it too if you suggest a windows tool. Just trying to find an easy way that will work.

Discussion is locked

- Collapse -
Re: sorting text.
Feb 11, 2011 7:02AM PST

Text files never have bold in them, it's just plain text. So this isn't a text file, but a file in some wordprocessor format (MS Works, MS Word, Wordpad, AmiPro, OpenOffice Writer, you didn't tell).

I'm afraid writing a macro on that wordprocessor to do this will take much more time than just doing it manually. But if you want to try to write a macro to do it: just start and see where you end.

Kees

- Collapse -
not text
Feb 11, 2011 7:19AM PST

I never said it was just plain text. The original file is a pdf but i copied it to a word processor to make it easier. I want to key in on the "bold title" as a place to start the copy, and then read some of the lines of text as a key for which category to go in, then stop reading at the next bold title. Your reply didn't help much, is there a tutorial, program, or otherwise helpful link?

- Collapse -
It can be text. But let's find a tool about this.
Feb 11, 2011 7:24AM PST
- Collapse -
Re: tutorial
Feb 12, 2011 12:20AM PST
- Collapse -
Thanks!
Feb 12, 2011 2:53AM PST

Awesome thanks guys, i didn't know VBA was what most macros were coded in. I appreciate the links and information.