Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-25-2023, 08:44 AM
RobiNew RobiNew is offline Access the FootnoteSeparator and then return its vertical position relative to page Windows 10 Access the FootnoteSeparator and then return its vertical position relative to page Office 2016
Competent Performer
Access the FootnoteSeparator and then return its vertical position relative to page
 
Join Date: Sep 2023
Posts: 183
RobiNew is on a distinguished road
Question Access the FootnoteSeparator and then return its vertical position relative to page

Hi! Is there a way with a macro of accessing the FootnoteSeparator and then returning its vertical position relative to page? Can someone help? Thanks!
Reply With Quote
  #2  
Old 09-25-2023, 05:55 PM
Guessed's Avatar
Guessed Guessed is offline Access the FootnoteSeparator and then return its vertical position relative to page Windows 10 Access the FootnoteSeparator and then return its vertical position relative to page Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You can try this line which seems to work for me when the selection is on the page you are interested in (not in the footnote area)
Code:
  Debug.Print Selection.Range.Bookmarks("\Page").Range.Footnotes.Separator.Information(wdVerticalPositionRelativeToPage)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 09-26-2023, 12:43 AM
RobiNew RobiNew is offline Access the FootnoteSeparator and then return its vertical position relative to page Windows 10 Access the FootnoteSeparator and then return its vertical position relative to page Office 2016
Competent Performer
Access the FootnoteSeparator and then return its vertical position relative to page
 
Join Date: Sep 2023
Posts: 183
RobiNew is on a distinguished road
Default

Many thanks, Guessed! It does work also for me, but I was expecting to find different values depending on the number of footnotes in the page. Instead I get the same value for every page of the document. My aim was to establish the VerticalPosition of the first line of the footnote in various contexts (normal first line, first line of a footnote continuation, first line with hyphenation, etc.). I thought I could do that in a simple way, because my present solution is rather complicated.
Reply With Quote
  #4  
Old 09-26-2023, 01:21 AM
Guessed's Avatar
Guessed Guessed is offline Access the FootnoteSeparator and then return its vertical position relative to page Windows 10 Access the FootnoteSeparator and then return its vertical position relative to page Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I got a different vertical position when the footnotes pushed the separator higher so I thought it would work. It does depend on which page your footnote separator appears on.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 09-26-2023, 06:37 AM
RobiNew RobiNew is offline Access the FootnoteSeparator and then return its vertical position relative to page Windows 10 Access the FootnoteSeparator and then return its vertical position relative to page Office 2016
Competent Performer
Access the FootnoteSeparator and then return its vertical position relative to page
 
Join Date: Sep 2023
Posts: 183
RobiNew is on a distinguished road
Default

That's what I expected: a different vertical position when the footnotes push the separator higher. What do you mean when you say that it depends on which page the footnote separator appears on. I have tried the code on two different *.docx and I got the same value on every page, though different in the two *.docx.
Reply With Quote
  #6  
Old 09-26-2023, 09:10 PM
Guessed's Avatar
Guessed Guessed is offline Access the FootnoteSeparator and then return its vertical position relative to page Windows 10 Access the FootnoteSeparator and then return its vertical position relative to page Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

A footnote separator's position depends on the page you are interrogating. Some pages won't have any footnotes. Pages with footnotes will show a different position for the separator depending on how much content sits in the footnote area of that particular page.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #7  
Old 09-26-2023, 11:26 PM
RobiNew RobiNew is offline Access the FootnoteSeparator and then return its vertical position relative to page Windows 10 Access the FootnoteSeparator and then return its vertical position relative to page Office 2016
Competent Performer
Access the FootnoteSeparator and then return its vertical position relative to page
 
Join Date: Sep 2023
Posts: 183
RobiNew is on a distinguished road
Default

I'm well aware of the fact that pages with footnotes will show a different position for the separator depending on how much content sits in the footnote area of that particular page. But that's why I cannot understand why the simple code you posted returns the same value for each page with different amounts of content in the footnotes.
Reply With Quote
  #8  
Old 09-27-2023, 12:12 AM
Guessed's Avatar
Guessed Guessed is offline Access the FootnoteSeparator and then return its vertical position relative to page Windows 10 Access the FootnoteSeparator and then return its vertical position relative to page Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

OK, it appears that we are just getting the position on the first page.

Can you explain what you need this info for? Perhaps there is a better way to achieve whatever point you have for needing this info. For instance you can audit the page and position of each footnote and surmise that the separator appears a static distance above each top footnote on the page.
Code:
Sub aTest()
  Dim aFN As Footnote
  For Each aFN In ActiveDocument.Footnotes
    Debug.Print aFN.Index, aFN.Range.Information(wdActiveEndPageNumber), aFN.Range.Information(wdVerticalPositionRelativeToPage)
  Next aFN
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #9  
Old 09-27-2023, 12:46 AM
RobiNew RobiNew is offline Access the FootnoteSeparator and then return its vertical position relative to page Windows 10 Access the FootnoteSeparator and then return its vertical position relative to page Office 2016
Competent Performer
Access the FootnoteSeparator and then return its vertical position relative to page
 
Join Date: Sep 2023
Posts: 183
RobiNew is on a distinguished road
Default

Your new code is very interesting, but I want to test (and possibly use) it on a single page. Could you please modify it? I was only indirectly interested in the Separator vertical position. My aim is a simple macro to establish the VerticalPosition of the first line of the the first footnote on the page. My ultimate aim is to esablish the size of the gap between the last line of text and the first line of the first footnote. The latter varies: it may be a normal first line, the first line of a continuation, a first line with hyphenation, etc.
Reply With Quote
Reply

Tags
footnoteseparator, vertical postion



Similar Threads
Thread Thread Starter Forum Replies Last Post
Access the FootnoteSeparator and then return its vertical position relative to page De-limiting the Ruler in the vertical position disabled. PhilCoolmarket Word 3 08-03-2018 06:28 AM
Access the FootnoteSeparator and then return its vertical position relative to page Image absolute position relative to page thuizt Word VBA 4 08-01-2017 07:25 AM
Vertical Scroll Position Bossmare Word 1 03-08-2017 07:55 PM
Access the FootnoteSeparator and then return its vertical position relative to page Vertical Position From Top Off Page Jumping Lines gc28 Word 1 04-05-2016 10:59 AM
Fix data output position relative to page Al See Mail Merge 1 01-16-2014 04:13 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:47 AM.


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