Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

Counting lines

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Conan Kelly - 13 Nov 2006 22:14 GMT
Hello all,

Is there a way to count how many lines are in the current selection?

I've been looking for it but haven't found anything.  I've found the Count property of Paragraphs, Words, & Sentences; but no Lines
property.

If not possible to count lines, how about counting the number of paragraph marks in the current selection?

Signature

Thanks for any help anyone can provide,

Conan Kelly

Greg Maxey - 13 Nov 2006 23:14 GMT
Sub Scratchmacro()
Dim oRng As Range
Set oRng = Selection.Range
MsgBox oRng.ComputeStatistics(wdStatisticLines)
End Sub

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Hello all,
>
[quoted text clipped - 5 lines]
> If not possible to count lines, how about counting the number of
> paragraph marks in the current selection?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.