Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-20-2015, 03:45 PM
macropod's Avatar
macropod macropod is offline How to keep the footnote(endnote) reference numbers when pasting text between two documents? Windows 7 64bit How to keep the footnote(endnote) reference numbers when pasting text between two documents? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,527
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

If the footnote references are numeric, you could use code like:
Code:
Sub Demo()
Dim StrRef As String
With Selection
  If .Footnotes.Count > 0 Then
    StrRef = .Footnotes(1).Index
    MsgBox StrRef
  End If
End With
End Sub
If they're anything else (e.g. roman numerals), you'll need code like:
Code:
Sub Demo()
Dim Rng As Range, StrRef As String, i As Long
With Selection
  If .Footnotes.Count > 0 Then
    i = .Footnotes(1).Index
    Set Rng = .Footnotes(1).Reference
    With Rng
      'To get the actual reference text, we need to cross-reference it!
      .Collapse wdCollapseStart
      .InsertCrossReference wdRefTypeFootnote, wdFootnoteNumber, i, False, False
      .End = .End + 1
      StrRef = .Fields(1).Result
      .Fields(1).Delete
    End With
    MsgBox StrRef
  End If
End With
Set Rng = Nothing
End Sub
Do note what I said in my previous post, though, about the implications on the rest of your document of doing what you're suggesting. I think you'll find the result unacceptable.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to keep the footnote(endnote) reference numbers when pasting text between two documents? Convert endnote/footnote to regular text Cobb78 Word 5 07-11-2016 06:23 AM
Macro to find text only footnote numbers TimFromPhx Word VBA 7 04-10-2014 07:05 PM
How to keep the footnote(endnote) reference numbers when pasting text between two documents? Endnote in footnote? kerstin Word 2 06-26-2011 11:23 PM
endnote and import reference from word to endnote uncung Word 0 06-18-2011 08:09 AM
How to keep the footnote(endnote) reference numbers when pasting text between two documents? Cross-reference endnote text smed Word 3 01-14-2011 03:34 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:47 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