U
umchemist
Hi Everyone!
Can anyone help me with the macro below? I would like it to simply extract
all the footers in the document and paste them into a new word document???
Each footer would be a new line, essentially assembling a list of all the
footers. What I have so far unfortunately does not work and complains about
syntax errors.....can anyone please help me ???
Sub PullMe()
Dim lCount As Long
Dim sEnd As String
Dim oDoc As Document
sEnd = "Endnotes" & vbCrLf
For lCount = 1 To ActiveDocument.Endnotes.Count
sEnd = sEnd & lCount & vbTab &
ActiveDocument.Endnotes(lCount).Range.Text & vbCrLf
Next lCount
sEnd = sEnd & "Footnotes" & vbCrLf
For lCount = 1 To ActiveDocument.Footnotes.Count
sEnd = sEnd & lCount & vbTab &
ActiveDocument.Footnotes(lCount).Range.Text & vbCrLf
Next lCount
Set oDoc = Documents.Add
oDoc.Range.Text = sEnd
End Sub
Can anyone help me with the macro below? I would like it to simply extract
all the footers in the document and paste them into a new word document???
Each footer would be a new line, essentially assembling a list of all the
footers. What I have so far unfortunately does not work and complains about
syntax errors.....can anyone please help me ???
Sub PullMe()
Dim lCount As Long
Dim sEnd As String
Dim oDoc As Document
sEnd = "Endnotes" & vbCrLf
For lCount = 1 To ActiveDocument.Endnotes.Count
sEnd = sEnd & lCount & vbTab &
ActiveDocument.Endnotes(lCount).Range.Text & vbCrLf
Next lCount
sEnd = sEnd & "Footnotes" & vbCrLf
For lCount = 1 To ActiveDocument.Footnotes.Count
sEnd = sEnd & lCount & vbTab &
ActiveDocument.Footnotes(lCount).Range.Text & vbCrLf
Next lCount
Set oDoc = Documents.Add
oDoc.Range.Text = sEnd
End Sub