newbie101
05-21-2013, 05:52 AM
Hi Folks,
Recently I asked how to determine the distance of text from the page margins. The question was answered by macropod using this subroutine
Sub GetVerticalPosition()
Application.ScreenUpdating = False
Dim sTopMargin As Single, sBottomMargin As Single, sBottomLine As Single
Dim sPageHeight As Single, sPrintHeight As Single, sVertPos As Single
With Selection.Characters.First
sVertPos = .Information(wdVerticalPositionRelativeToTextBoundary) + _
.ParagraphFormat.SpaceBefore
With .PageSetup
sTopMargin = .TopMargin
sBottomMargin = .BottomMargin
sPageHeight = .PageHeight
End With
sPrintHeight = sPageHeight - sTopMargin - sBottomMargin
MsgBox "The top of the first selected character is " & sVertPos & _
" points below the top margin and " & sPrintHeight - sVertPos & _
" points above the bottom margin."
End With
Application.ScreenUpdating = True
End Sub
My question now is, is there a way to determine the same thing (distance of text from margins) for footnotes?
Thanks in advance.
Recently I asked how to determine the distance of text from the page margins. The question was answered by macropod using this subroutine
Sub GetVerticalPosition()
Application.ScreenUpdating = False
Dim sTopMargin As Single, sBottomMargin As Single, sBottomLine As Single
Dim sPageHeight As Single, sPrintHeight As Single, sVertPos As Single
With Selection.Characters.First
sVertPos = .Information(wdVerticalPositionRelativeToTextBoundary) + _
.ParagraphFormat.SpaceBefore
With .PageSetup
sTopMargin = .TopMargin
sBottomMargin = .BottomMargin
sPageHeight = .PageHeight
End With
sPrintHeight = sPageHeight - sTopMargin - sBottomMargin
MsgBox "The top of the first selected character is " & sVertPos & _
" points below the top margin and " & sPrintHeight - sVertPos & _
" points above the bottom margin."
End With
Application.ScreenUpdating = True
End Sub
My question now is, is there a way to determine the same thing (distance of text from margins) for footnotes?
Thanks in advance.