|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to keep the footnote(endnote) reference numbers when pasting text between two documents?
How to keep the footnote(endnote) reference numbers when pasting text from one Word document to another? I know it's very difficult, but appreciate it if anyone can help. |
#2
|
||||
|
||||
Any footnotes & endnotes you copy & paste between document will be renumbered to fit the sequence into which they're inserted in the destination document. That is unavoidable. If you have the numbering set to re-start with each Section or page (for footnotes) that may be acceptable. However, if you want continuous numbering, the only workaround would be to insert Section breaks either side of the pasted content and set an appropriate starting # for that section. Doing so, however, will mess up your footnote & endnote numbering for all subsequent content.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks, Macropod, for you quick reply.
Your reply actually gives me some idea: I can add a section break before and after the text I am pasting in the destination document, and get the reference number of the first footnote within that piece of text as a text string, and set the section in the destination document to start the footnotes within from that particular number. As I really want to do it via VBA, can you help me with getting the reference number of a footnote as a text string? Thanks.
|
#4
|
||||
|
||||
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 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
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Thanks for your help!//
Thanks for your help. It solved my problem.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
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 |
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 |
Cross-reference endnote text | smed | Word | 3 | 01-14-2011 03:34 PM |