Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    239
    Thanks
    4
    Thanked 1 Time in 1 Post

    Jump from Footnote to Reference

    I have written a macro that finds a particular footnote. That works fine.
    I also have the code to go to the next footnote and highlight the symbol for that footnote. In Word itself, if you right click a highlighted footnote symbol, you can select Go to Footnote and you jump the foonote reference in the main document.
    I need to emulate that in VBA. Can someone please help me on this bit?
    A workaround would be to go to the top of the page on which the footnote appears.
    Thanks.

  2. #2
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jump from Footnote to Reference

    By selecting a FN and then recording a macro to do what you were asking, it generated the following code. I don't know what (if any) of this is extraneous, but it will at least give you a place to start:

    <pre>Sub FNView()
    ' Macro recorded 2/23/2001 by mackenziek
    '
    If ActiveWindow.ActivePane.View.Type = wdPrintView Or ActiveWindow. _
    ActivePane.View.Type = wdWebView Or ActiveWindow.ActivePane.View.Type = _
    wdPrintPreview Then
    ActiveWindow.View.SeekView = wdSeekFootnotes
    Else
    ActiveWindow.View.SplitSpecial = wdPaneFootnotes
    End If
    End Sub</pre>


    HTH
    Karen

  3. #3
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    239
    Thanks
    4
    Thanked 1 Time in 1 Post

    Re: Jump from Footnote to Reference

    Thanks for responding.
    I believe that is the code that takes you FROM the body of the document TO the footnote, it is certainly the same as the code generated when I recorded a macro to do that.
    What I need, and sorry if I was not clear, is the code to go back FROM the footnotes TO the body, either to the footnote reference in the body or the beginning of that page (it will always be a hard page break).
    Thanks for your help

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Jump from Footnote to Reference

    Karen's oh-so-close, though: if you record the action you mention you get this:

    If ActiveWindow.ActivePane.View.Type = wdPrintView Or _
    ActiveWindow.ActivePane.View.Type = wdWebView Or _
    ActiveWindow.ActivePane.View.Type = wdPrintPreview Then
    ActiveWindow.View.SeekView = wdSeekMainDocument
    Else
    ActiveWindow.Panes(2).Close
    End If

    The latter part of the code looks a bit fragile, but the does the first part do the trick? FWIW, "Go to Footnote" is grayed out in Normal view, so all of those tests on the view appear to be parallel to real life.

  5. #5
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Jump from Footnote to Reference

    The last part is in the event user is in "Normal" view, in which case footnotes are in a split pane at the bottom of the page.
    Karen

  6. #6
    3 Star Lounger
    Join Date
    Feb 2001
    Location
    UK
    Posts
    239
    Thanks
    4
    Thanked 1 Time in 1 Post

    Re: Jump from Footnote to Reference

    That's it guys. Thanks so much, now for the next part! Watch this space.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •