![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
My goal is to save all the paragraphs starting with the word "transcript" and after that, delete all those "transcript" at the beginning of all the remaining paragraphs since they all have it.
Here's my code so far: Code:
Sub Para()
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
If InStr(1, oPara.Range.Words(1).Text, "transcript") = False Then
oPara.Range.Delete
oPara.Range.Delete
ElseIf InStr(1, oPara.Range.Words(1).Text, "transcript") = True Then
oPara.Range.Words(1).Text = Replace(oPara.Range.Words(1).Text, "Keep ", "")
End If
Next
End Sub
|
|
|
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 |