Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-17-2022, 04:14 PM
macropod's Avatar
macropod macropod is offline Extract all footnotes and add them to a customized table Windows 10 Extract all footnotes and add them to a customized table Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,366
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

Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim DocSrc As Document, DocTgt As Document, Tbl As Table, Rng As Range, FtNt As Footnote, i As Long
Set DocSrc = ActiveDocument: Set DocTgt = Documents.Add
With DocTgt
  Set Tbl = .Tables.Add(Range:=.Range, Numrows:=3, NumColumns:=2, DefaultTableBehavior:=wdWord9TableBehavior)
  With Tbl
    .Columns(1).Cells.Merge
    .Cell(1, 2).Range.Text = "Original:" & vbCr
    .Cell(2, 2).Range.Text = "Copy 1:" & vbCr
    .Cell(3, 2).Range.Text = "Copy 2:" & vbCr
  End With
  Set Rng = Tbl.Range
  For i = 1 To DocSrc.Footnotes.Count - 1
    .Range.Characters.Last.FormattedText = Rng.FormattedText
  Next
  For i = 1 To DocSrc.Footnotes.Count
    With Tbl
      .Cell((i - 1) * 3 + 1, 1).Range.Text = i
      .Cell((i - 1) * 3 + 1, 2).Range.Characters.Last.Text = DocSrc.Footnotes(i).Range.FormattedText
      .Cell((i - 1) * 3 + 2, 2).Range.Characters.Last.Text = DocSrc.Footnotes(i).Range.FormattedText
      .Cell((i - 1) * 3 + 3, 2).Range.Characters.Last.Text = DocSrc.Footnotes(i).Range.FormattedText
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
extract, footnotes, table



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract all footnotes and add them to a customized table Extract words which has superscripts and the corresponding superscript value in footnotes in word sai Word VBA 12 05-11-2020 04:29 AM
Extract all footnotes and add them to a customized table How to add footnotes below the table ad.dias Word Tables 6 08-27-2017 02:42 PM
Extract all footnotes and add them to a customized table Create footnotes from table... ¿AUTOMATICALLY? jbaranao Word 3 02-08-2015 08:57 PM
Extract duplicates in table goran.c Excel 0 01-21-2015 12:47 AM
automatically extract footnotes into new file and apply character format to footnote hrdwa Word 0 02-27-2010 03:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:26 PM.


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