Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #13  
Old 10-23-2025, 01:01 PM
macropod's Avatar
macropod macropod is offline How to count the number of lines in a Word table cell Windows 10 How to count the number of lines in a Word table cell Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,489
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by gmaxey View Post
Paul, I have tested and rested with a simple document with one 2 x 2 table where the text in the target cell splits across a page. In every instance without using "<> p" I do not get the expected count.


In one test there were two lines of text on the first page and 3 lines on the second page using either "< p" or "> P" the return is 2. Only with using "<> p" do I get the expected return of 5.
Curious. For me the code works just fine with:
Code:
If .Characters.First.Information(wdVerticalPositionRelativeToPage) > p
returning 51 on a 2*2 table spanning two pages.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write a macro to count the number of lines between the start of a Word document to where the soroush.kalantari Word VBA 3 08-08-2021 09:23 PM
How to count the number of lines in a Word table cell count the number of text in a cell based off a different cells text Kubi Excel 4 08-24-2017 05:53 PM
How to count the number of lines in a Word table cell Row Number of Selected Cell in Table alexolcz Word VBA 2 12-10-2015 09:54 PM
How can I delete spaces & lines in a table cell mrayncrental Word VBA 3 10-20-2014 07:09 PM
Text Wrapping on Fixed Lines in a Form field/Table cell okrmjr Word Tables 0 10-30-2009 08:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:46 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft