![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#2
|
||||
|
||||
|
The following should work
Code:
Sub Macro1()
'Graham Mayor - http://www.gmayor.com - Last updated - 13 Jul 2017
Dim oPara As Paragraph
Dim oRng As Range
Dim i As Integer
For Each oPara In ActiveDocument.Paragraphs
Set oRng = oPara.Range.Words(1)
If LCase(Trim(oRng.Text)) = "transcript" Then
oRng.Text = "Keep "
Else
oPara.Range.Delete
End If
Next oPara
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem starting Microsoft Office Apps | Ladi | Word | 1 | 03-06-2017 01:59 PM |
Starting page layout problem in Word 2010 - top of page cut off
|
paik1002 | Word | 2 | 01-21-2016 03:59 AM |
Problem with bold numbers in multi-level list styles when having numbered headings AND paragraphs
|
bwofficer | Word | 2 | 12-12-2014 12:21 AM |
| How to unite paragraphs starting with small capital letters with large case paragraph | csongi12xme | Word | 1 | 04-12-2014 02:25 PM |
Starting Word Problem
|
GeorgeVoudouris | Word | 4 | 09-07-2011 03:39 AM |