count line in word document RRS feed

  • Question

  • How can I count line of document?

    If I have only one page I write:

    Selection.EndKey Unit:=wdStory
    countLine = Selection.Information(wdFirstCharacterLineNumber)

    but, what am I do with more then pages?   

    Monday, April 2, 2012 2:08 PM


  • Try

    countLine = ActiveDocument.ComputeStatistics(wdStatisticLines)

    Regards, Hans Vogelaar

    • Marked as answer by hila_d Monday, April 2, 2012 2:29 PM
    Monday, April 2, 2012 2:16 PM

All replies