Reply
 
Thread Tools Display Modes
  #1   Report Post  
Steve
 
Posts: n/a
Default Find Replace bold formatting with delimiter

Hi,



I have paragraphs whose first couple of words are in bold and represent
titles of magazines and then immediately following a description of the
magazine in plain text. I would like to parse these into separate fields by
placing a delimiter between the bold text and plain and then doing a Text to
Columns in Excel. So, if I used the ampersand '@' as a delimiter I would
like to do the following:



Before Find Replace

boldInterior DesignboldA magazine on the interior design industry.



After Find Replace

boldInterior Designbold@A magazine on the interior design industry.



It doesn't matter if the title remains bold so long as a delimiter is placed
between it and the description.



Thanks - Steve


  #2   Report Post  
Greg Maxey
 
Posts: n/a
Default

Steve,

First stab would be EditReplaceMore. Put your cursor in the find what
field then click formatfontbold. Put your cursor in the replace with
field and enter ^&@.

This will give you boldTitlebold@ Description.

If you want you could then find @space and replace with @, leaving you with
boldTitlebold@Description

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Steve wrote:
Hi,



I have paragraphs whose first couple of words are in bold and
represent titles of magazines and then immediately following a
description of the magazine in plain text. I would like to parse
these into separate fields by placing a delimiter between the bold
text and plain and then doing a Text to Columns in Excel. So, if I
used the ampersand '@' as a delimiter I would like to do the
following:


Before Find Replace

boldInterior DesignboldA magazine on the interior design industry.



After Find Replace

boldInterior Designbold@A magazine on the interior design
industry.


It doesn't matter if the title remains bold so long as a delimiter is
placed between it and the description.



Thanks - Steve



  #3   Report Post  
Helmut Weber
 
Posts: n/a
Default

Hi Steve,
if there is no other bold text, then

Sub Makro3()
Dim rDcm As Range
Set rDcm = ActiveDocument.Range
ResetSearch
With rDcm.Find
.Font.Bold = True
.Replacement.Text = "^&@" '!
.MatchWildcards = True
.Execute Replace:=wdReplaceAll
End With
ResetSearch
End Sub

Sub ResetSearch()
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
End Sub

Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
  #4   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

As a shortcut, you can just press Ctrl+B in the (empty) "Find what" box to
apply Format: Font: Bold.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Greg Maxey" gro.spvm@yexamg (thats my e-mail address backwards) wrote in
message ...
Steve,

First stab would be EditReplaceMore. Put your cursor in the find what
field then click formatfontbold. Put your cursor in the replace with
field and enter ^&@.

This will give you boldTitlebold@ Description.

If you want you could then find @space and replace with @, leaving you

with
boldTitlebold@Description

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Steve wrote:
Hi,



I have paragraphs whose first couple of words are in bold and
represent titles of magazines and then immediately following a
description of the magazine in plain text. I would like to parse
these into separate fields by placing a delimiter between the bold
text and plain and then doing a Text to Columns in Excel. So, if I
used the ampersand '@' as a delimiter I would like to do the
following:


Before Find Replace

boldInterior DesignboldA magazine on the interior design industry.



After Find Replace

boldInterior Designbold@A magazine on the interior design
industry.


It doesn't matter if the title remains bold so long as a delimiter is
placed between it and the description.



Thanks - Steve




  #5   Report Post  
Greg Maxey
 
Posts: n/a
Default

You don't say. Thanks :-)

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Suzanne S. Barnhill wrote:
As a shortcut, you can just press Ctrl+B in the (empty) "Find what"
box to apply Format: Font: Bold.


"Greg Maxey" gro.spvm@yexamg (thats my e-mail address backwards)
wrote in message ...
Steve,

First stab would be EditReplaceMore. Put your cursor in the find
what field then click formatfontbold. Put your cursor in the
replace with field and enter ^&@.

This will give you boldTitlebold@ Description.

If you want you could then find @space and replace with @, leaving
you with boldTitlebold@Description

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Steve wrote:
Hi,



I have paragraphs whose first couple of words are in bold and
represent titles of magazines and then immediately following a
description of the magazine in plain text. I would like to parse
these into separate fields by placing a delimiter between the bold
text and plain and then doing a Text to Columns in Excel. So, if I
used the ampersand '@' as a delimiter I would like to do the
following:


Before Find Replace

boldInterior DesignboldA magazine on the interior design
industry.



After Find Replace

boldInterior Designbold@A magazine on the interior design
industry.


It doesn't matter if the title remains bold so long as a delimiter
is placed between it and the description.



Thanks - Steve





  #6   Report Post  
Steve
 
Posts: n/a
Default

Thank you!

So ^& was the secret to all this, although Helmut's more general solution
deserves accolades.


  #7   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

There are a number of shortcuts that work this way: Ctrl+B, Ctrl+I,
Ctrl+Shift+H, Ctrl+J/L,R,E (basically most of the shortcuts for font and
paragraph formatting), as well as Ctrl+Spacebar and Ctrl+Q (to remove any of
the previous). The font formatting ones are three-way toggles. Ctrl+B once
gives you Format: Font: Bold. Twice gives you Format: Font: Not Bold. A
third time (or Ctrl+Spacebar) cancels the formatting.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Greg Maxey" gro.spvm@yexamg (thats my e-mail address backwards) wrote in
message ...
You don't say. Thanks :-)

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Suzanne S. Barnhill wrote:
As a shortcut, you can just press Ctrl+B in the (empty) "Find what"
box to apply Format: Font: Bold.


"Greg Maxey" gro.spvm@yexamg (thats my e-mail address backwards)
wrote in message ...
Steve,

First stab would be EditReplaceMore. Put your cursor in the find
what field then click formatfontbold. Put your cursor in the
replace with field and enter ^&@.

This will give you boldTitlebold@ Description.

If you want you could then find @space and replace with @, leaving
you with boldTitlebold@Description

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Steve wrote:
Hi,



I have paragraphs whose first couple of words are in bold and
represent titles of magazines and then immediately following a
description of the magazine in plain text. I would like to parse
these into separate fields by placing a delimiter between the bold
text and plain and then doing a Text to Columns in Excel. So, if I
used the ampersand '@' as a delimiter I would like to do the
following:


Before Find Replace

boldInterior DesignboldA magazine on the interior design
industry.



After Find Replace

boldInterior Designbold@A magazine on the interior design
industry.


It doesn't matter if the title remains bold so long as a delimiter
is placed between it and the description.



Thanks - Steve




  #8   Report Post  
Klaus Linke
 
Posts: n/a
Default

....with the added bonus that you can selectively find stuff that you can't
enter in the dialog (say "Bold, Not italic" = Ctrl+B, Ctrl+I, Ctrl+I).

Regards,
Klaus


"Suzanne S. Barnhill" wrote:
There are a number of shortcuts that work this way: Ctrl+B,
Ctrl+I, Ctrl+Shift+H, Ctrl+J/L,R,E (basically most of the shortcuts
for font and paragraph formatting), as well as Ctrl+Spacebar and
Ctrl+Q (to remove any of the previous). The font formatting ones
are three-way toggles. Ctrl+B once gives you Format: Font: Bold.
Twice gives you Format: Font: Not Bold. A third time (or Ctrl+
Spacebar) cancels the formatting.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org

"Greg Maxey" gro.spvm@yexamg (thats my e-mail address backwards) wrote

in
message ...
You don't say. Thanks :-)

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Suzanne S. Barnhill wrote:
As a shortcut, you can just press Ctrl+B in the (empty) "Find what"
box to apply Format: Font: Bold.


"Greg Maxey" gro.spvm@yexamg (thats my e-mail address backwards)
wrote in message ...
Steve,

First stab would be EditReplaceMore. Put your cursor in the find
what field then click formatfontbold. Put your cursor in the
replace with field and enter ^&@.

This will give you boldTitlebold@ Description.

If you want you could then find @space and replace with @, leaving
you with boldTitlebold@Description

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Steve wrote:
Hi,



I have paragraphs whose first couple of words are in bold and
represent titles of magazines and then immediately following a
description of the magazine in plain text. I would like to parse
these into separate fields by placing a delimiter between the bold
text and plain and then doing a Text to Columns in Excel. So, if I
used the ampersand '@' as a delimiter I would like to do the
following:


Before Find Replace

boldInterior DesignboldA magazine on the interior design
industry.



After Find Replace

boldInterior Designbold@A magazine on the interior design
industry.


It doesn't matter if the title remains bold so long as a delimiter
is placed between it and the description.



Thanks - Steve






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
Find and Replace Locks Up Word Karine Rivet Formatting Long Documents 1 January 22nd 05 07:21 AM
Find and Replace Locks Up Word Karine Rivet Microsoft Word Help 0 January 21st 05 11:01 PM
Find and Replace anomaly BruceM Microsoft Word Help 7 January 18th 05 06:47 PM
--A Find & Replace Question-- KlikThis Microsoft Word Help 3 January 1st 05 06:58 PM
Find Replace bold formatting with delimiter Steve Microsoft Word Help 7 December 7th 04 04:41 PM


All times are GMT +1. The time now is 10:05 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"