Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-17-2016, 04:55 PM
formulaic formulaic is offline Word Comments to Endnotes Conversion problem Mac OS X Word Comments to Endnotes Conversion problem Office for Mac 2011
Novice
Word Comments to Endnotes Conversion problem
 
Join Date: Jul 2016
Posts: 2
formulaic is on a distinguished road
Default Word Comments to Endnotes Conversion problem

Hi,



I used the below VBA macro I found on a forum to convert 700 comments in a word document into endnotes. This worked perfectly until I uploaded the word document to Amazon Kindle where it will be an ebook. In Word the endnote numbering system, restarting from 1 after each section break between chapters works perfectly. But when the document becomes a .mobi file for Kindle it lists the endnotes straight through from 1 to 700. This is a big problem as the superscript endnote reference numbers then become very obtrusive.

Does anyone know what I can do to rectify this? I'm guessing that the VBA macro I used makes the Word document look perfect but screws up the conversion process to .mobi for e-readers. I've tried every formatting solution I can think of, but I'm guessing what I need to do is somehow take the macro out of the Word document but leave what it did intact. But this is beyond my ability.

I've been researching and writing this book for 3 years and this is the final problem I need to solve in order to publish it, so much thanks in advance for any help.

Best,
Ben
___________________________

Sub comment2footnote()
Application.ScreenUpdating = False
Dim oDoc As Document, oComment As Comment
Set oDoc = ActiveDocument
For Each oComment In ActiveDocument.Comments
oDoc.Footnotes.Add Range:=oComment.Scope, Text:=oComment.Range.Text
oComment.Delete
Next
Application.ScreenUpdating = True
End Sub

I got it from here http://superuser.com/questions/16065...nt-to-footnote
Reply With Quote
  #2  
Old 07-20-2016, 02:30 AM
DougMVP DougMVP is offline Word Comments to Endnotes Conversion problem Windows 7 32bit Word Comments to Endnotes Conversion problem Office 2010 32bit
Advanced Beginner
 
Join Date: Nov 2013
Posts: 50
DougMVP will become famous soon enough
Default

Running the following macro, which will convert the EndNotes to "textnotes" may overcome the issue. (Run it on a copy of your document)

Code:
' Macro created 29/09/99 by Doug Robbins to replace endnotes with textnotes at end of document
' to 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
Reply With Quote
  #3  
Old 07-20-2016, 04:42 PM
formulaic formulaic is offline Word Comments to Endnotes Conversion problem Mac OS X Word Comments to Endnotes Conversion problem Office for Mac 2011
Novice
Word Comments to Endnotes Conversion problem
 
Join Date: Jul 2016
Posts: 2
formulaic is on a distinguished road
Default

Hi Doug.

Thanks for your attempt. Unfortunately it got rid of the end noting entirely so now it runs, even in Word, straight through from 1 to 700 with no link between text and endnotes.

Not to worry though as I've decided to present my endnotes differently now, so there will be no need for me to do this conversion anymore. Thanks for trying,

Best
Ben
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Comments to Endnotes Conversion problem WordPerfect to Word Conversion Footnote Problem RobertWA Word 1 12-21-2015 05:41 AM
Word Comments to Endnotes Conversion problem How to convert endnotes in a text doc to Word endnotes? Dickison Word VBA 4 10-06-2012 09:11 PM
Word Comments to Endnotes Conversion problem PDF conversion cuts off comments lilianblythe Word 5 07-26-2012 02:54 AM
Word Comments to Endnotes Conversion problem Convert - EndNote to Word's endnotes Boatwrenchv8 Word 3 05-17-2012 04:56 PM
Word Comments to Endnotes Conversion problem text conversion problem ahill Outlook 2 01-20-2011 04:45 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:40 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