How do I get the number of lines on the page that the cursor is currently on in VBA? Thanks
M mcphc Aug 22, 2007 #1 How do I get the number of lines on the page that the cursor is currently on in VBA? Thanks
H Helmut Weber Aug 22, 2007 #2 Hi, Sub Test89p() Dim rtmp As Range Set rtmp = Selection.Bookmarks("\page").Range MsgBox rtmp.ComputeStatistics(wdStatisticLines) End Sub Note that this rises error 5941, if the cursor is at the end of doc. Sure you don't need help to handle that.
Hi, Sub Test89p() Dim rtmp As Range Set rtmp = Selection.Bookmarks("\page").Range MsgBox rtmp.ComputeStatistics(wdStatisticLines) End Sub Note that this rises error 5941, if the cursor is at the end of doc. Sure you don't need help to handle that.