![]() |
|
#1
|
|||
|
|||
|
Hi all. I have a document that has some empty lines start with "uppercase letter + ." like this:
2018-01-17_114845.png Or simply start with "." like this: 2018-01-17_114818.png My code so far can only remove the 2nd case Code:
Sub DeleteLinesStartWith()
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)) = "." Then
oPara.Range.Delete
End If
Next oPara
End Sub
If LCase(Trim(oRng.Text)) = "." Then 2. Some signs cannot be written in the VBA, like "•". In this case then, how can I delete an empty line start with "•"? Use the Unicode somehow? Thank you very much. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "Internet Connection Needed ... Error Code: 0-9" When Trying to use Online Repair | millardjd | Office | 0 | 01-22-2015 07:54 AM |
How to get "Track Changes" to ignore "Field Code Changed"?
|
Joey Cheung | Word | 2 | 10-31-2014 07:55 PM |
| Cross Reference Heading Number with the word "Section" included | bblouin | Word | 5 | 12-20-2012 05:27 PM |
code "0020" appearing instead of space chracter in word docm, file
|
radleyyeldar | Word | 1 | 07-30-2012 05:13 AM |
How to choose a "List" for certain "Heading" from "Modify" tool?
|
Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |