Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Find Replace bold formatting with delimiter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve - 03 Dec 2004 10:06 GMT
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
Dave Lett - 03 Dec 2004 15:53 GMT
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

> Hi,
>
[quoted text clipped - 15 lines]
>
> Thanks - Steve
Steve - 03 Dec 2004 19:27 GMT
Thank you for your help, Steve
Gene - 20 Dec 2004 19:26 GMT
I have to thank you too!  This resolved my bottleneck today with a little
modification.
Signature


Thanks,

Gene

> Hi Steve,
>
[quoted text clipped - 64 lines]
> >
> > Thanks - Steve
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.