S
Snew
Hi i have to made a macro for word file but its taking the blank line too i
have to remone the counting of blank line, im new to this pls help.
I have to make it as line count for every line but if the paragraph start it
should count per 65 char as a line count and no blank line
the code is :-
Sub LC()
Dim LCOUNT As Integer
Dim CTST As String
Dim CSRT As String
Dim Char As Integer
LCOUNT = 0
CSRT = Chr(13)
Selection.MoveUp Unit:=wdScreen, Count:=9999
Do
CharPos = Selection.Range.Start
Selection.MoveRight Unit:=wdCharacter, Count:=1
CTST = Selection
Selection.EscapeKey
If CTST = CSRT Then
LCOUNT = LCOUNT + 1
Char = 0
Else
Char = Char + 1
If Char = 65 Then
LCOUNT = LCOUNT + 1
Char = 0
End If
End If
Loop Until CharPos = Selection.Range.End
Response = MsgBox(LCOUNT, vbOKOnly + vbInformation, "Line Count Utility")
End Sub
have to remone the counting of blank line, im new to this pls help.
I have to make it as line count for every line but if the paragraph start it
should count per 65 char as a line count and no blank line
the code is :-
Sub LC()
Dim LCOUNT As Integer
Dim CTST As String
Dim CSRT As String
Dim Char As Integer
LCOUNT = 0
CSRT = Chr(13)
Selection.MoveUp Unit:=wdScreen, Count:=9999
Do
CharPos = Selection.Range.Start
Selection.MoveRight Unit:=wdCharacter, Count:=1
CTST = Selection
Selection.EscapeKey
If CTST = CSRT Then
LCOUNT = LCOUNT + 1
Char = 0
Else
Char = Char + 1
If Char = 65 Then
LCOUNT = LCOUNT + 1
Char = 0
End If
End If
Loop Until CharPos = Selection.Range.End
Response = MsgBox(LCOUNT, vbOKOnly + vbInformation, "Line Count Utility")
End Sub