Reply
 
Thread Tools Display Modes
  #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




  #2   Report Post  
mpt
 
Posts: n/a
Default

I was able to create a macro to search for unique text on a line, such as
"Region" and then change the style to something like "Bullet 1."

Could you create and debug a macro to do the same for one line of text then
duplicate the code in that macro as many times as you have a change to be
made, then edit the text for each subsection and add the unique text for
each of the other lines you want to change?

Didn't know you could change styles with S&R. Thanks for the tip.

RIchard



"Centurion" wrote in message
...
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






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Text Formatting Susan B. Quinn Microsoft Word Help 2 June 16th 05 05:56 PM
Can autocomplete insert unformatted text into a document? Daiya Mitchell Microsoft Word Help 1 February 22nd 05 02:23 PM
A problem with text boxes and free space on the page [email protected] New Users 3 January 4th 05 09:39 PM
When I change text formatting, the entire document is changed mikem Microsoft Word Help 3 December 10th 04 04:07 PM
User-applied formatting of text field contents? Ed Kennedy Microsoft Word Help 1 December 3rd 04 04:44 PM


All times are GMT +1. The time now is 02:37 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"