Find Replace bold formatting with delimiter

S

Steve

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
<bold>Interior Design<bold>A magazine on the interior design industry.

After Find Replace
<bold>Interior Design<bold>@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
 
D

Dave Lett

Hi Steve,

I'm not sure of a lot about your problem. For example, if you want to do
this in Excel, why are you writing to a Word newsgroup? I'll assume that
you're starting in Word and only intend to use Text to Columns in Excel (but
Word has this functionality). Here's my test document (where "Interior
Design is boldfaced):

Interior Design A magazine on the interior design industry

Interior Design A magazine on the interior design industry

Interior Design A magazine on the interior design industry

Interior Design A magazine on the interior design industry

Interior Design A magazine on the interior design industry

Interior Design A magazine on the interior design industry



Here's the routine I used to change this to a table

With Selection
.HomeKey unit:=wdStory
With .Find
.ClearFormatting
.Font.Bold = True
.Text = ""
Do While .Execute
With Selection
.InsertAfter Text:="@"
.MoveRight
End With
Loop
End With
End With

ActiveDocument.Range.ConvertToTable Separator:="@", NumColumns:=2



Now, main problem is this: If you have any other boldface formatting, I
cannot gaurantee this to work, and I don't know of an efficient workaround.



HTH and good luck,



Dave
 
G

Gene

I have to thank you too! This resolved my bottleneck today with a little
modification.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top