Converting Word to text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone supply tips for converting large Word documents to plain text,
preserving or translating as much formatting as possible?

I'm especially interested in bold, underline and italics. Italics, for
example, can be translated in text files like _this._ But would you have to
go through changing them all manually?

Thanks,
Joe
 
Hey Joe-

Use File>Save As and open the bottom list to choose Save As Type of your
choice. Rich Text Format (RTF) will preserve formatting.

HTH |:>)
 
You need to use the Replace function in Word to replace the formatting.
eg
In the find box enter CTRL+B (font bold)
In the replace box enter CTRL+B CTRL+B (font not bold) *^&*

This will put an asterisk either side of each bold bit.
For italics and underline you can use a similar technique.

Unfortunately you can't record formatting options in the macro recorder so
you would have to add them to vba manually, if you wanted to create a macro
to operate on several documents. The code for the above example is

Sub ReplaceExample()

Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
'**********************
.Text = ""
.Font.Bold = True

.Replacement.Text = "*^&*"
.Replacement.Font.Bold = False
'**********************
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
End With
Selection.Find.Execute replace:=wdReplaceAll
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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

Back
Top