Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
bruno bruno is offline
external usenet poster
 
Posts: 6
Default VBA Macro for Footnotes

Hi,

Re. "VBA Macro for Footnotes" - convert footnote numbers to pure text and
add the footnotes as a list at the end of the document, without any other
references than the numbers - in Word 2003 SP3.

Similar matter was dealt with in recent conversation "VBA Macro For
FootNotes" (5/25/2009) - where the list of footnotes was to be placed in a
new document -, and i also found an older conversation "Convert footnotes to
ordinary text" (sept. 2007) where the footnote text was to be put directly in
the body text.

By combining the solutions found there I think it should be no problem to
get the solution to my requirement, but it is not as simple as that, at least
not for someone like me: my skills go scarcely beyond using the macro
recorder.

Below i add my macro which I combined of the codes suggested in above
mentioned conversations. It stops at the first appearence of
rngfoot.Range.InsertParagraphAfter

Could someone please tell me what is wrong ?

sub
Dim docfoot As Footnotes
Dim i As Long
Dim rngfoot As Range
Dim fn As Word.Footnote
Dim rngFN As Word.Range

If ActiveDocument.Footnotes.Count 0 Then
Set docfoot = ActiveDocument.Footnotes
Else
MsgBox "There are no footnotes in this document.", _
vbExclamation, "Exit"
Exit Sub
End If

Set rngfoot = ActiveDocument.Sections.Last
rngfoot.Range.InsertParagraphAfter
rngfoot.Range.InsertParagraphAfter

With docfoot
For i = 1 To .Count
rngfoot.Range.InsertAfter .Item(i).Range.Text
rngfoot.Range.InsertParagraphAfter

Set fn = ActiveDocument.Footnotes(i)

Set rngFN = fn.Reference
rngFN.Collapse wdCollapseEnd

rngFN.Range.InsertAfter "[ & i & ]"
fn.Delete

Next
End With
End Sub

It cost me a lot of time to come so far, was it all in vain?
bruno
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default VBA Macro for Footnotes

Hi bruno,

It would help if you said what it is you're trying to do ...

--
Cheers
macropod
[Microsoft MVP - Word]


"bruno" wrote in message ...
Hi,

Re. "VBA Macro for Footnotes" - convert footnote numbers to pure text and
add the footnotes as a list at the end of the document, without any other
references than the numbers - in Word 2003 SP3.

Similar matter was dealt with in recent conversation "VBA Macro For
FootNotes" (5/25/2009) - where the list of footnotes was to be placed in a
new document -, and i also found an older conversation "Convert footnotes to
ordinary text" (sept. 2007) where the footnote text was to be put directly in
the body text.

By combining the solutions found there I think it should be no problem to
get the solution to my requirement, but it is not as simple as that, at least
not for someone like me: my skills go scarcely beyond using the macro
recorder.

Below i add my macro which I combined of the codes suggested in above
mentioned conversations. It stops at the first appearence of
rngfoot.Range.InsertParagraphAfter

Could someone please tell me what is wrong ?

sub
Dim docfoot As Footnotes
Dim i As Long
Dim rngfoot As Range
Dim fn As Word.Footnote
Dim rngFN As Word.Range

If ActiveDocument.Footnotes.Count 0 Then
Set docfoot = ActiveDocument.Footnotes
Else
MsgBox "There are no footnotes in this document.", _
vbExclamation, "Exit"
Exit Sub
End If

Set rngfoot = ActiveDocument.Sections.Last
rngfoot.Range.InsertParagraphAfter
rngfoot.Range.InsertParagraphAfter

With docfoot
For i = 1 To .Count
rngfoot.Range.InsertAfter .Item(i).Range.Text
rngfoot.Range.InsertParagraphAfter

Set fn = ActiveDocument.Footnotes(i)

Set rngFN = fn.Reference
rngFN.Collapse wdCollapseEnd

rngFN.Range.InsertAfter "[ & i & ]"
fn.Delete

Next
End With
End Sub

It cost me a lot of time to come so far, was it all in vain?
bruno

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Peter T. Daniels Peter T. Daniels is offline
external usenet poster
 
Posts: 3,215
Default VBA Macro for Footnotes

Are you submitting a book ms. to a publisher that requires a separate
file of endnotes?

On Jul 17, 6:59*pm, "macropod" wrote:
Hi bruno,

It would help if you said what it is you're trying to do ...

--
Cheers
macropod
[Microsoft MVP - Word]



"bruno" wrote in ...
Hi,


Re. *"VBA Macro for Footnotes" - convert footnote numbers to pure text and
add the footnotes as a list at the end of the document, without any other
references than the numbers - in Word 2003 SP3. *


Similar matter was dealt with in recent conversation "VBA Macro For
FootNotes" (5/25/2009) - where the list of footnotes was to be placed in a
new document -, and i also found an older conversation "Convert footnotes to
ordinary text" (sept. 2007) where the footnote text was to be put directly in
the body text.


By combining the solutions found there I think it should be no problem to
get the solution to my requirement, but it is not as simple as that, at least
not for someone like me: my skills go scarcely beyond using the macro
recorder.


Below i add my macro which I combined of the codes suggested in above
mentioned conversations. It stops at the first appearence of
* * * *rngfoot.Range.InsertParagraphAfter


Could someone please tell me what is wrong ?


sub
* *Dim docfoot As Footnotes
* *Dim i As Long
* *Dim rngfoot As Range
* *Dim fn As Word.Footnote
* *Dim rngFN As Word.Range


* *If ActiveDocument.Footnotes.Count 0 Then
* * * *Set docfoot = ActiveDocument.Footnotes
* *Else
* * * *MsgBox "There are no footnotes in this document.", _
* * * *vbExclamation, "Exit"
* * * *Exit Sub
* *End If


* *Set rngfoot = ActiveDocument.Sections.Last
* * * *rngfoot.Range.InsertParagraphAfter
* * * *rngfoot.Range.InsertParagraphAfter


* *With docfoot
* *For i = 1 To .Count
* * * *rngfoot.Range.InsertAfter .Item(i).Range.Text
* * * *rngfoot.Range.InsertParagraphAfter


* * * *Set fn = ActiveDocument.Footnotes(i)


* * * *Set rngFN = fn.Reference
* * * *rngFN.Collapse wdCollapseEnd


* * * *rngFN.Range.InsertAfter "[ & i & ]"
* * * *fn.Delete


* *Next
* *End With
End Sub


It cost me a lot of time to come so far, was it all in vain?
bruno-

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
bruno bruno is offline
external usenet poster
 
Posts: 6
Default VBA Macro for Footnotes

What i am trying to do ? ... Quite often I need to combine two long Word
documents (with many footnotes) side by side in two columns of an Excel table
(to allow paragraph alignment) - keeping essential text formatting like bold
and italic, the para numbers, the footnote numbers in the text and the
footnotes listed at the end of the table, they can have same font size and
colour as body text.

To do this I convert the text to table in Word and then copy and paste the
table to Excel. When I have my table completed in Excel i copy it back to a
new Word document for further processing (formatting, save, print).

The footnotes cause two problems:
1. In Excel the cells containing footnote numbers appear as links in small
fontsize and colour. To change this i deactivate hyperlinks and adapt the
font size.
2. And when I copy and paste the table back to Word the footnotes appear
again in another colour and underlined, and again I have to correct this.

I think these problems should be avoided by executing the following task in
the original Word documents:
-- break the links between footnote numbers in the text and the footnotes
and make appear both as ordinary text, with footnotes listed at the end of
the document (thus not as "endnotes"). The links are not required for my
purposes.

It is this task i am trying to automise with my macro. Can you tell me how
to make it work ?

bruno

  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Peter T. Daniels Peter T. Daniels is offline
external usenet poster
 
Posts: 3,215
Default VBA Macro for Footnotes

But why do you go through Excel, instead of simply creating a Word
table?

Or, if notes 1-25 have to be in col. 1 and notes 26-50 in col. 2,
tables in a two-column section?

On Jul 18, 7:45*am, bruno wrote:
What i am trying to do ? ... Quite often I need to combine two long Word
documents (with many footnotes) side by side in two columns of an Excel table
(to allow paragraph alignment) - keeping essential text formatting like bold
and italic, the para numbers, the footnote numbers in the text and the
footnotes listed at the end of the table, they can have same font size and
colour as body text.

To do this I convert the text to table in Word and then copy and paste the
table to Excel. When I have my table completed in Excel i copy it back to a
new Word document for further processing (formatting, save, print).

The footnotes cause two problems:
1. In Excel the cells containing footnote numbers appear as links in small
fontsize and colour. To change this i deactivate hyperlinks and adapt the
font size.
2. And when I copy and paste the table back to Word the footnotes appear
again in another colour and underlined, and again I have to correct this.

I think these problems should be avoided by executing the following task in
the original Word documents:
-- *break the links between footnote numbers in the text and the footnotes
and make appear both as ordinary text, with footnotes listed at the end of
the document (thus not as "endnotes"). The links are not required for my
purposes.

It is this task i am trying to automise with my macro. Can you tell me how
to make it work ? *

bruno




  #6   Report Post  
Posted to microsoft.public.word.docmanagement
bruno bruno is offline
external usenet poster
 
Posts: 6
Default VBA Macro for Footnotes

My need is to combine two long Word documents (with many footnotes) side by
side in two columns of one table. Excel, because it facilitates paragraph
alignment.
--
bruno

  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Peter T. Daniels Peter T. Daniels is offline
external usenet poster
 
Posts: 3,215
Default VBA Macro for Footnotes

What are you doing more easily in Excel than in Word, that justifies
all the complications involved in switching documents between the two
programs (including turning footnotes into static text)?

On Jul 18, 8:27*am, bruno wrote:
My need is to combine two long Word documents (with many footnotes) side by
side in two columns of one table. Excel, because it facilitates paragraph
alignment.
--
bruno


  #8   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default VBA Macro for Footnotes

Hi Bruno,

I can't see how Excel helps paragraph alignment any better than a Word table (which you can split at paragraph breaks).

In any event, if you're looking for the differences between the two documents, there are better ways (eg Tools|Merge Documents or a
macro that simply goes though each para looking for & highlighting the differences).

--
Cheers
macropod
[Microsoft MVP - Word]


"bruno" wrote in message ...
My need is to combine two long Word documents (with many footnotes) side by
side in two columns of one table. Excel, because it facilitates paragraph
alignment.
--
bruno


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New footnotes not inserting in same format as existing footnotes Kristin M. Microsoft Word Help 1 October 17th 08 05:12 PM
How to enable Footnotes in Word 2003 when View Footnotes is OFF? Leechado Microsoft Word Help 1 July 5th 06 03:43 PM
Find should search text AND footnotes when starting in footnotes Ted Sichelman Microsoft Word Help 0 November 10th 05 07:42 PM
Adding new footnotes to old Doc starts new footnotes and doesn't do continuous J Pilet Page Layout 4 April 23rd 05 03:23 AM
Macro that will add the file path & date to Word footnotes? Rich P Microsoft Word Help 2 December 15th 04 07:49 PM


All times are GMT +1. The time now is 08:55 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"