Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement,microsoft.public.word.general,microsoft.public.word.formatting.longdocs
Greg Greg is offline
external usenet poster
 
Posts: 20
Default Finding & Replacing Characters using wildcards

Hi,

I am trying to use the Find/Replace wildcard syntax and add Heading 1
styles to my text. I have turned For example I have the following
sample text in my document:

MyHead1AnthropologyHead1My
MyHead1Cell BiologyHead1My
MyHead1Center for Neuroscience and Regeneration ResearchHead1My

It is my understanding that I need to use the following in the "Find
What" box:

(MyHead1*Head1My^13)

And use the following in the "Replace With" box:

\1^p ((style "Heading 1"))

However, it doesn't apply the "Heading 1" style format instead I get:

MyHead1Anatomical PathologyHead1My

((style "Heading 1"))

Can someone explain what I need to fix to accomplish what I need?
Thanks in advance for any help you can offer.

-Greg

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Finding & Replacing Characters using wildcards

Hi Greg,

Well, your Replace With expression is completely wrong. You can't type
anything into the Replace With box to set the style; you have to do that
through the Format button in the dialog. Also, although you don't say so, I
assume you want to remove the "tags" at the beginning and end of each
heading, so that will alter your Find What expression, too.

In the Find What box, enter

MyHead1(*)Head1My(^13)

In the Replace With box, enter

\1\2

Each item in the Find What box that's surrounded by parentheses becomes a
numbered item in the Replace With expression -- the \1 refers to the
characters matched by the star, which is everything except the "tags", and
the \2 refers to the paragraph mark.

Then click the Format button, select Style, and select Heading 1 from the
list. Below the Replace With box you should see the notation "Format: Style:
Heading 1". Now you can click the Replace All button.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Greg wrote:
Hi,

I am trying to use the Find/Replace wildcard syntax and add Heading 1
styles to my text. I have turned For example I have the following
sample text in my document:

MyHead1AnthropologyHead1My
MyHead1Cell BiologyHead1My
MyHead1Center for Neuroscience and Regeneration ResearchHead1My

It is my understanding that I need to use the following in the "Find
What" box:

(MyHead1*Head1My^13)

And use the following in the "Replace With" box:

\1^p ((style "Heading 1"))

However, it doesn't apply the "Heading 1" style format instead I get:

MyHead1Anatomical PathologyHead1My

((style "Heading 1"))

Can someone explain what I need to fix to accomplish what I need?
Thanks in advance for any help you can offer.

-Greg



  #3   Report Post  
Posted to microsoft.public.word.docmanagement,microsoft.public.word.general,microsoft.public.word.formatting.longdocs
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 171
Default Finding & Replacing Characters using wildcards

You only need:
MyHead1*^13
in Find what
and:
^&
in Replace with.

With the cursor in the replace with field:
Click More and in the Search options pane click formatStyleHeading1


Greg wrote:
Hi,

I am trying to use the Find/Replace wildcard syntax and add Heading 1
styles to my text. I have turned For example I have the following
sample text in my document:

MyHead1AnthropologyHead1My
MyHead1Cell BiologyHead1My
MyHead1Center for Neuroscience and Regeneration ResearchHead1My

It is my understanding that I need to use the following in the "Find
What" box:

(MyHead1*Head1My^13)

And use the following in the "Replace With" box:

\1^p ((style "Heading 1"))

However, it doesn't apply the "Heading 1" style format instead I get:

MyHead1Anatomical PathologyHead1My

((style "Heading 1"))

Can someone explain what I need to fix to accomplish what I need?
Thanks in advance for any help you can offer.

-Greg


  #4   Report Post  
Posted to microsoft.public.word.docmanagement,microsoft.public.word.general,microsoft.public.word.formatting.longdocs
Greg Greg is offline
external usenet poster
 
Posts: 20
Default Finding & Replacing Characters using wildcards

Hi,

Thanks Jay & Greg for your prompt replies. I used Jay's version and it
is now working. And as Jay thought, I did want to remove the prefix
(MyHead1) and suffix (Head1My) tags from the final results.

-Greg
Greg Maxey wrote:
You only need:
MyHead1*^13
in Find what
and:
^&
in Replace with.

With the cursor in the replace with field:
Click More and in the Search options pane click formatStyleHeading1


Greg wrote:
Hi,

I am trying to use the Find/Replace wildcard syntax and add Heading 1
styles to my text. I have turned For example I have the following
sample text in my document:

MyHead1AnthropologyHead1My
MyHead1Cell BiologyHead1My
MyHead1Center for Neuroscience and Regeneration ResearchHead1My

It is my understanding that I need to use the following in the "Find
What" box:

(MyHead1*Head1My^13)

And use the following in the "Replace With" box:

\1^p ((style "Heading 1"))

However, it doesn't apply the "Heading 1" style format instead I get:

MyHead1Anatomical PathologyHead1My

((style "Heading 1"))

Can someone explain what I need to fix to accomplish what I need?
Thanks in advance for any help you can offer.

-Greg


  #5   Report Post  
Posted to microsoft.public.word.docmanagement,microsoft.public.word.general,microsoft.public.word.formatting.longdocs
Greg Maxey Greg Maxey is offline
external usenet poster
 
Posts: 171
Default Finding & Replacing Characters using wildcards

Greg,

Glad your issue is resolved. After reading Jay's reply I figures he
deduced your actual intent. I on the other hand tend to just "anwer
the question." Must be conditioning from my regular job ;-)


Greg wrote:
Hi,

Thanks Jay & Greg for your prompt replies. I used Jay's version and it
is now working. And as Jay thought, I did want to remove the prefix
(MyHead1) and suffix (Head1My) tags from the final results.

-Greg
Greg Maxey wrote:
You only need:
MyHead1*^13
in Find what
and:
^&
in Replace with.

With the cursor in the replace with field:
Click More and in the Search options pane click formatStyleHeading1


Greg wrote:
Hi,

I am trying to use the Find/Replace wildcard syntax and add Heading 1
styles to my text. I have turned For example I have the following
sample text in my document:

MyHead1AnthropologyHead1My
MyHead1Cell BiologyHead1My
MyHead1Center for Neuroscience and Regeneration ResearchHead1My

It is my understanding that I need to use the following in the "Find
What" box:

(MyHead1*Head1My^13)

And use the following in the "Replace With" box:

\1^p ((style "Heading 1"))

However, it doesn't apply the "Heading 1" style format instead I get:

MyHead1Anatomical PathologyHead1My

((style "Heading 1"))

Can someone explain what I need to fix to accomplish what I need?
Thanks in advance for any help you can offer.

-Greg




  #6   Report Post  
Posted to microsoft.public.word.docmanagement,microsoft.public.word.general,microsoft.public.word.formatting.longdocs
Greg Greg is offline
external usenet poster
 
Posts: 20
Default Finding & Replacing Characters using wildcards

Hi,

Opps, I should mention I modifed my "Find What" syntax to:

(MyHead1)(*)(Head1My^13)

And "Replace With" syntax to:

\2^p

This got me what I wanted!

Thanks again,
Greg
Greg wrote:
Hi,

Thanks Jay & Greg for your prompt replies. I used Jay's version and it
is now working. And as Jay thought, I did want to remove the prefix
(MyHead1) and suffix (Head1My) tags from the final results.

-Greg
Greg Maxey wrote:
You only need:
MyHead1*^13
in Find what
and:
^&
in Replace with.

With the cursor in the replace with field:
Click More and in the Search options pane click formatStyleHeading1


Greg wrote:
Hi,

I am trying to use the Find/Replace wildcard syntax and add Heading 1
styles to my text. I have turned For example I have the following
sample text in my document:

MyHead1AnthropologyHead1My
MyHead1Cell BiologyHead1My
MyHead1Center for Neuroscience and Regeneration ResearchHead1My

It is my understanding that I need to use the following in the "Find
What" box:

(MyHead1*Head1My^13)

And use the following in the "Replace With" box:

\1^p ((style "Heading 1"))

However, it doesn't apply the "Heading 1" style format instead I get:

MyHead1Anatomical PathologyHead1My

((style "Heading 1"))

Can someone explain what I need to fix to accomplish what I need?
Thanks in advance for any help you can offer.

-Greg


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
Finding words that are 34 characters or higher--search expression erik_gregory Microsoft Word Help 1 February 7th 06 12:57 AM
replacing characters vs. inserting, while editing text in Word Packey Microsoft Word Help 1 January 22nd 06 03:17 PM
Finding and replacing symbols Hans L Microsoft Word Help 0 November 6th 05 01:00 AM
finding special characters New Users 2 June 1st 05 09:51 AM
Wildcards using [ ] characters Jacob Microsoft Word Help 3 February 8th 05 06:44 AM


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

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"