Replace feature

G

Guest

I can't imagine what I'm doing wrong but....

When I try to replace a tab with a first line indent of .5 it doesn't remove
the tab, just adds the first line indent. So I have a first line indent of
..5 and a tab. Any reason why it's not replace the tab?

Thanks.

Office 2003
 
L

Luc

Kim,
Those are two different functions, either indent or use a tab. I would
suggest to use the indent as that will be repeated when you hit enter to
start a new paragraph.

Luc Sanders (MVP - Powerpoint)
 
G

Guest

Yes, that I know. My question was how to do a global replace of a tab with
a first line indent. We don't create documents with tabs everywhere, but
when we scan or get documents from the outside we have to edit them and we
always remove the tabs at the beginining of each paragraph and set it to a
first line indent or we add a style, but unfortantely when we add a style it
doesn't remove the tab either.
 
S

Suzanne S. Barnhill

I suspect you'll have to do this in two separate operations, one to apply
the style and another to remove the tabs. For the second replace, just
search for ^t (in a paragraph of the given style, if desired) and replace
with nothing.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
G

Greg

Kim,

How about:
Sub Test()
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Range.Paragraphs
If oPara.Range.Characters.First = vbTab Then
oPara.Range.Characters.First.Delete
oPara.FirstLineIndent = InchesToPoints(0.5)
End If
Next
End Sub
 

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