![]() |
|
![]() |
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
![]()
Yes, for some reason, the imported paragraph marks are coming up as double characters (probably a vbCrLf rather than a vbCr).
I've altered the code so it deals with that Code:
Sub GetUsedParas() Dim sList As String, i As Long, sText As String For i = 1 To ActiveDocument.Paragraphs.Count sText = Trim(ActiveDocument.Paragraphs(i).Range.Text) 'Debug.Print Len(sText) If Split(sText, vbCr)(0) = "" Then sList = sList & "," & i End If Next i MsgBox Mid(sList, 2), vbInformation + vbOKOnly, "Empty Paragraphs List" End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#2
|
|||
|
|||
![]()
Andrew Sir,
The below code was just Fantastic. Code:
Sub GetUsedParas() Dim sList As String, i As Long, sText As String For i = 1 To ActiveDocument.Paragraphs.Count sText = Trim(ActiveDocument.Paragraphs(i).Range.Text) 'Debug.Print Len(sText) If Split(sText, vbCr)(0) = "" Then sList = sList & "," & i End If Next i MsgBox Mid(sList, 2), vbInformation + vbOKOnly, "Empty Paragraphs List" End Sub ![]() Now coming back to Paul's Sir remark on his post #12 Quote:
Quote:
Thread 1: No: 46342 : Post No24 : TM 14 |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help to get data from notepad to word | ganesang | Word VBA | 2 | 08-11-2019 10:21 PM |
Word does not stop at the set tab, but it keeps forever on the same line like it would in Notepad. | danvina@gmail.com | Word | 2 | 01-16-2019 02:33 PM |
![]() |
Noclip1 | Word | 1 | 10-25-2017 10:55 PM |
![]() |
JohnTurnbull | Word | 5 | 08-27-2017 11:17 PM |
![]() |
Robert11 | Word | 3 | 08-12-2013 12:35 PM |