Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 06-13-2012, 09:09 AM
abarenberg abarenberg is offline Separating endnotes from text Windows 7 32bit Separating endnotes from text Office 2010 32bit
Novice
 
Join Date: Jun 2012
Posts: 1
abarenberg is on a distinguished road
Default Question about macro

Thanks so much for posting this. I have been searching for weeks for just such a solution. I'm submitting a book to a publisher and am required to put the endnotes into a separate file, and I couldn't figure out how to cut them and paste them into a new document.

Could I trouble you for more advice on this -- how do I change the format of the detached endnotes? That is, could I change them so that they are formatted as:

1. Smith.
[2 spaces between the '.' and 'Smith']

Rather than the following that the macro generates:

1 Smith.

Thanks in advance!



Alan Barenberg
Reply With Quote
  #17  
Old 06-13-2012, 04:03 PM
macropod's Avatar
macropod macropod is offline Separating endnotes from text Windows 7 64bit Separating endnotes from text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Hi Alan,

With the first macro I posted, it's as simple as changing:
.Text = i
to:
.Text = i & ". "
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #18  
Old 09-12-2012, 03:59 PM
kenglade kenglade is offline Separating endnotes from text Mac OS X Separating endnotes from text Office for Mac 2011
Novice
Separating endnotes from text
 
Join Date: Dec 2011
Location: Rio Rancho, NM
Posts: 26
kenglade is on a distinguished road
Default Working with endnotes

I've been rattling every cage I can find for some help in copying endnotes in Word for Mac 2011. Stephan Bloom was a big help in getting me through the first step but now the second step is eluding me.

What I want to do is copy the endnotes from a chapter to a separate document and remove them from the original while retaining the superscript numbers in the original and providing a corresponding number in the deleted/copied.moved endnotes.

Word will not let me simply copy endnotes. An error message pops up saying it is an invalid action. The macro Bloom sent resolves part of the problem. It removes the superscripts from the endnotes and replaces them with regular numbers which can then be copied to a new document. The problem is the revised list looks like this:

1 Now is the time ...

My aim is to make it look like this:

1. Now is the time ...
2. For all good men ...

And so on through the list of footnotes. Does anyone have any idea how to create a macro to do this?

The second problem is the Bloom macro replaces all the superscripted references. Where before it looked like this:

Now is the time(superscript 1)

It comes out like this:

Now is the timea1a...

That means going through the entire document and replace the "a...a" with the appropriate superscript.

I think I I've found a workaround here,. if I work in Master Document mode the document appears as the original with all the endnote references in place and properly superscripted. It also removes the endnotes. I've only tried this with a couple of documents but it is encouraging.

The problem remains with formatting the copied endnotes.

Any and all help would be appreciated.
Reply With Quote
  #19  
Old 09-12-2012, 06:22 PM
macropod's Avatar
macropod macropod is offline Separating endnotes from text Windows 7 64bit Separating endnotes from text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Hi Ken,

I've posted four macros for you to try in this (merged) thread. Except for some comments re the first one, I've never had any feedback from you as to whether they worked and, if not, what the issue was.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #20  
Old 09-13-2012, 09:03 AM
kenglade kenglade is offline Separating endnotes from text Mac OS X Separating endnotes from text Office for Mac 2011
Novice
Separating endnotes from text
 
Join Date: Dec 2011
Location: Rio Rancho, NM
Posts: 26
kenglade is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Hi Ken,

I've posted a number of macros for you to try in this (merged) thread. Except for some comments re the first one, I've never had any feedback from you as to whether they worked and, if not, what the issue was.
Paul

Maybe I missed some, but I've seen only two. My email referred to the first one which begins:

Sub ExtractEndNotes()
Application.ScreenUpdating = False
Dim Rng As Range, i As Long, Doc As Document
With ActiveDocument

I tried the second one but it generated an error message saying something to the effect that it was not working and needed to be debugged. I let the debugger run for quite a long time, but it never produced any results.

I'm far from an expert and I have no idea how to perform a debugging process except to let the process run.

I'd be delighted to re-try any of your suggestions and promptly report the results.

Ken
Reply With Quote
  #21  
Old 09-13-2012, 04:05 PM
macropod's Avatar
macropod macropod is offline Separating endnotes from text Windows 7 64bit Separating endnotes from text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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 you get a 'debug' error, note what the error message says and, when you press 'debug', which code line is highlighted. If you report those details, we may be able to deal with whatever the issue is.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #22  
Old 09-14-2012, 08:44 AM
kenglade kenglade is offline Separating endnotes from text Mac OS X Separating endnotes from text Office for Mac 2011
Novice
Separating endnotes from text
 
Join Date: Dec 2011
Location: Rio Rancho, NM
Posts: 26
kenglade is on a distinguished road
Default

Paul

This is the macro I'm trying to run:
Code:
Sub test()
'Macro created 29/09/99 by Doug Robbins to replace endnotes with textnotes at end of document
' and replace the endnote reference in the body of the document with a superscript number.
'
Dim aendnote As Endnote
For Each aendnote In ActiveDocument.Endnotes
  ActiveDocument.Range.InsertAfter vbCr & aendnote.Index & vbTab & aendnote.Range
  aendnote.Reference.InsertBefore "a" & aendnote.Index & "a"
Next aendnote
For Each aendnote In ActiveDocument.Endnotes
  aendnote.Reference.Delete
Next aendnote
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
  .Superscript = True
End With
With Selection.Find
  .Text = "(a)([0-9]{1,})(a)"
  .Replacement.Text = "\2"
  .Forward = True
  .Wrap = wdFindContinue
  .Format = True
  .MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
And the response is:
Run time error '4605'
This method or property is not available because the object spans a frame or note boundary

Note that macro was written in 1999, which was long before Word for Mac 2011. But what it wants to accomplish is exactly what I'm trying to do.

I very much appreciate your time.

Ken

Last edited by macropod; 09-14-2012 at 04:05 PM. Reason: Added code tags & formatting
Reply With Quote
  #23  
Old 09-14-2012, 04:10 PM
macropod's Avatar
macropod macropod is offline Separating endnotes from text Windows 7 64bit Separating endnotes from text Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

We know about the problems with Doug's code, which is why I've posted four different macros for you to try. It appears you've only ever tried the first one. The code in post #15 (https://www.msofficeforums.com/word/...html#post28578), especially, shouldn't generate any of those errors.

Of course, without knowing exactly what's in your endnotes, it's possible the error is because there's, say, a frame in one of them - as suggested by the error message.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing footnotes to endnotes Sarah Word 3 04-27-2017 08:55 PM
Separating endnotes from text Copying endnotes kenglade Word 4 12-03-2011 01:26 PM
Index entries in endnotes perhj Word 0 06-19-2011 09:28 AM
Separating endnotes from text how do I change fonts for endnotes of word 2007? Brent Word 5 02-01-2011 03:15 PM
Separating accounts aka252 Outlook 0 02-23-2006 07:55 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft