Selecting or deleting all text with certain formatting

H

Hellmasker

Hi everyone,

I have approximately 35000 words that has been edited by an editor. H
put a line through all text that he thinks is incorrect and added tex
that is underlined to replace the incorrect text.

I would like to figure out how to select all the text with th
strikethrough formatting and delete it AND select all text with th
underline formatting and remove the underline formatting.

I have no experience with macros but I found this to delete al
misspelled words:

Dim i As Long
With ActiveDocument
For i = .SpellingErrors.Count To 1 Step -1
.SpellingErrors(i).Delete
Next i
End With

From my programming experience, I'd think SpellingErrors would have t
be replaced with something that selects the underline format.

Can anyone help? Would be greatly appreciated! Thanks
 
S

Suzanne S. Barnhill

Are you sure he has actually applied these formats and not just used Track
Changes? If the latter, then you can just accept or reject the changes via
the Reviewing toolbar (Word 2003 and earlier) or Review tab (Word
2007/2010).

If the formatting has in fact been directly applied, then it is easy enough
to search for. For the underlining:

In the Replace dialog, leave both "Find what" and "Replace with" boxes
empty. In the "Find what" box, press Ctrl+U; you'll see "Format: Underline."
In the "Replace with" box, press Ctrl+U twice; you'll see "Format: No
underline." Replace All.

For the strikethrough:

Again, leave both boxes empty and clear the Underline formatting. Click More
to expand the dialog. With the insertion point in the "Find what" box, click
Format and choose Font. Check the box for Strikethrough and click OK.
Replace All.

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

Hellmasker

Hi Suzanne

I ended up making a macro that removed all underline but when I used i
on the 35k words, it didn't work because it was indeed the functio
track changes. So I just accepted all the changes and the strikethroug
and underlines disappeared

Thanks anyway
 
P

Peter T. Daniels

But that's how Track Changes is supposed to work ... they do it that
way so that you can inspect every change and approve or reject it
individually. Did you make sure that none of the changes accidentally
changed the meaning or emphasis?
 
H

Hellmasker

I agreed with the changes (99.9%) of them. That's why I wanted to ge
rid of the text with strikethrough and replace it with the underline
text. I thought the editor manually applied the strikethrough an
underline formats, because I was ignorant of the track changes function
so I made macros to remove the formats and delete the strikethroug
text. When I applied the macros they didn't work and when I inspecte
the text it had no format. Thus, I wasted hours learning macros t
figure out the track changes function in a few minutes.

Thanks for all your help! (though it came to late due to my impatienc
heh)
 

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