View Single Post
  #1   Report Post  
Centurion
 
Posts: n/a
Default Formatting of text problem - Help needed with Style Sheets & Search and Replace

Hiya

I'm just totally stumped at this one. I have a text document from an online
form (see below), and I'm trying to format each section individually to a
seperate style using the search and replace command.

The text will be exactly like this.

FORM START

Name : Blah
Area : Blah 2

Region : Blah 3


PDS1:
--------------------------------------------------------------------------
Ajjjj jkfgj kdfjgkd fjkjfgkd fjgkdf jgkjkfdj kjfd dsf dsgfsdgdg dsg sdg
sdgs sdg sdgs sdg ds sdg sdfg sdgsgsg gsgdsggs sdgsdgs sdgsdgsg sdgsg
sdgsd sdgsdgs sd sdg sdgsdgsg sdgsdg sdgsdgsdg
--------------------------------------------------------------------------

Contact name & tel: Blah4

PCE : 82834
STRP : NEW
CODE : 54321



FORM END



The data will change every time but the fieldnames (Name, Area, Region etc)
will stay the same. So one form might be Name : Blah and the next time Name
: Halb and so on. I want to be able to change each line to a seperate Style
using the search and replace command.



I'm trying to do a search saying :



Replace "Name : " with "Name : " with a new style sheet selected. Obviously
doing a search and replace for "Name : Blah" would be pointless as it's
going to change every new form.



Now every time I do this the entire document changes to the new style, which
is not what I'm looking for. I'm looking that every *section* of the data
above has a different style sheet, so "Name : Blah" would be Style 1. "Area
: Blah2" would be Style 2, "Region : Blah3" would be Style 3 and so on.



Is there *anyway* of doing this. I would be pulling my hair out if I had any
left, so can anyone please help.



Thanks for listening



JD