Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-03-2025, 01:47 AM
Bikram Bikram is offline Measuring Positions in msword Windows 10 Measuring Positions in msword Office 2007
Advanced Beginner
Measuring Positions in msword
 
Join Date: Jul 2021
Location: Nepal
Posts: 97
Bikram is on a distinguished road
Default

First of all Thank you for replying.
I was using the following code to test the vertical Position but it returned correct position of paragraphs for one page and returned 72.5 for all paragraphs of another page and also got the same result from python code. I also discovered that when a cell of a table is selected and Selection.Range.Information(wdVerticalPositionRela tiveToPage) is executed than also wdVerticalPositionRelativeToPage would give position relative to that table and not page. So, I was wondering that is there something that i am missing or is it a bug?
Code:
Sub GetParagraphVerticalPositionsWithSelection()
    Dim para As paragraph
    Dim vertPos As Single
    For Each para In ActiveDocument.Paragraphs
        para.Range.Select
        vertPos = Selection.Range.Information(wdVerticalPositionRelativeToPage)
        Debug.Print ("Paragraph: " & para.Range.text & "Vertical Position: " & vertPos)
    Next para
End Sub

Reply With Quote
Reply

Tags
vertical postion



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why my watermark are placed in different positions in some pages? shanlau Word VBA 2 12-04-2018 01:51 AM
Page numbers in different positions NugentS Word 3 12-04-2018 01:24 AM
Visio Pro 2016: Measuring the total length of a series of interconnected lines busander Visio 3 07-11-2017 09:53 AM
Measuring Turnaround Time quirkycanuck Outlook 0 03-03-2015 01:22 PM
Using MSWord 2003 docs in MSWord 2010 Joe Watson Word 7 05-31-2014 11:27 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:12 PM.


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