PDA

View Full Version : Find, copy and write to a new file.



doughep
09-14-2011, 01:51 PM
I have a document that contains text like the following and need to copy parts of the data and write to a new file. I'm a newbie at this and can't find any examples on how to start. Any help would be greatly appreciated.

The text is as follows:


1.0 - Engineering Updated: 14-Sep-11
Comment Status: Final
Grade: In Compliance




What I need to do is copy the "item" which is 1.0 - Engineering and the Grade into 2 seperate columns either in a word doceument or Excel. However, the trick is that there are other blocks of information that contain the item but grade is not used. There is only one grade per item. I have seen examples on writing a new file so I souldn't need help with that.

Tinbendr
10-16-2011, 08:52 AM
Attach a before and after document so we can see what you're expecting.

macropod
10-18-2011, 04:30 AM
You could, for example, mark all of the text as hidden, then use Find/Replace to Find all of the strings you're interested in (you might need to use a wildcard Find/Replace if part of the content varies for each string you're interested in), using the 'Replace' aspect to change them to 'not hidden', then save the document as a text file, or use another Find/Replace to delete all hidden text. Voila! all that's left its what you wanted.