Dear All,
How can I count the number of lines in MS-WORD document programatically.
Plz help and guide.
Thanks
Printable View
Dear All,
How can I count the number of lines in MS-WORD document programatically.
Plz help and guide.
Thanks
You need to use the BuiltinDocumentProperties.
VB Code:
Option Explicit Private Sub Command1_Click() Dim iLines As Integer iLines = ActiveDocument.BuiltInDocumentProperties(wdPropertyLines) MsgBox iLines & " Lines in the Active Document!" End Sub
Thank you Sir. :thumb: