#1   Report Post  
Posted to microsoft.public.word.docmanagement
Help me Help me is offline
external usenet poster
 
Posts: 2
Default selectinve formating

I have a document with 758 lines of questions and answers.

I want to format everything after the ? to the end of the line differently
with out having to do it manually for each line.

How can I do this ?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
DeanH DeanH is offline
external usenet poster
 
Posts: 1,862
Default selectinve formating

You can use the Wildcard option in the Replace function.
The code below will pick up the ? that is at the end of a sentence and
include all text up to the next paragraph mark.
Add this to the Find What box:
\?^13[+0-9A-z&./,)( €“_-]{1,}\^13

In the Replace with box add ^& (this means keep the found text the same) and
click on the More button. Check the Wildcard box.
Now add the format you wish to change the answer entries to, this can
include the Answer Style that you may have created.

You must ensure there are no ?[space] which will not be selected. You could
run a find replace for [space]^13 with ^13 several times which will remove
any spaces before the paragraph marks.

As you will see the ? will also be formatted along with the Answer entries.
You can do a replace for ?^13 and replace the formatting back to what you
want.
This code I have converted from a code I use regularly use to find any
sentence that does not have a period, so hopefully it will work for you.

All the best
DeanH


"Help me" wrote:

I have a document with 758 lines of questions and answers.

I want to format everything after the ? to the end of the line differently
with out having to do it manually for each line.

How can I do this ?

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
DeanH DeanH is offline
external usenet poster
 
Posts: 1,862
Default selectinve formating

You can use the Wildcard option in the Replace function.
The code below will pick up the ? that is at the end of a sentence and
include all text up to the next paragraph mark.
Add this to the Find What box:
\?^13[+0-9A-z&./,)( €“_-]{1,}\^13

In the Replace with box add ^& (this means keep the found text the same) and
click on the More button. Check the Wildcard box.
Now add the format you wish to change the answer entries to, this can
include the Answer Style that you may have created.

You must ensure there are no ?[space] which will not be selected. You could
run a find replace for [space]^13 with ^13 several times which will remove
any spaces before the paragraph marks.

As you will see the ? will also be formatted along with the Answer entries.
You can do a replace for ?^13 and replace the formatting back to what you
want.
This code I have converted from a code I use regularly use to find any
sentence that does not have a period, so hopefully it will work for you.

All the best
DeanH


"Help me" wrote:

I have a document with 758 lines of questions and answers.

I want to format everything after the ? to the end of the line differently
with out having to do it manually for each line.

How can I do this ?

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
Formating JDay Microsoft Word Help 1 March 29th 08 08:23 AM
Formating Stephen D Microsoft Word Help 2 February 18th 07 03:50 PM
Formating Kathy Microsoft Word Help 4 November 9th 06 10:09 PM
Formating Text changes formating of entire document Ritesh Kumar Microsoft Word Help 1 July 6th 05 11:55 PM
TOC Formating Robert M. Franz Formatting Long Documents 5 May 9th 05 08:53 PM


All times are GMT +1. The time now is 07:49 AM.

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

About Us

"It's about Microsoft Word"