Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 04-23-2014, 03:04 PM
Cosmo Cosmo is offline Questions about EndNotes Windows Vista Questions about EndNotes Office 2007
Competent Performer
Questions about EndNotes
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

I need to run a function on all EndNotes in a specific bookmark in my document, and I am using the following stripped down code: Code:
Dim noteCount as integerDim eNote as EndNotenoteCount = oBookmark.Range.EndNotes.Count Debug.Print "Bookmark " & oBookmark.name & " has " & CStr(noteCount) & " EndNotes." if (noteCount > 0) Then For Each eNote in oBookmark.Range.Endnotes Debug.Print "EndNote #" & eNote.index Next eNoteend if
When I run this on one of the bookmarks in my document, I get the correct NoteCount (e.g. 7), but the loop runs through ALL of the EndNotes in the document (e.g. I get 42 lines of 'EndNote #X')

Is this a bug, the fact that oBookmark.Range.EndNotes.Count lists 7, but when I loop through the oBookmark.Range.EndNotes collection, I get 42 EndNotes, or is there an error in my code? If this is a bug, is there something I can do to work around this? I tried to check eNote.Range.Bookmarks and eNote.Range.BookmarkID to verify that the EndNote belongs to the current bookmark, but I'm getting a '0' for both eNote.Range.BookmarkID & eNote.Range.Bookmarks.Count

I'm running Word 2007, if that matters.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to index words in endnotes ClaireB Word 1 11-11-2013 06:05 PM
Questions about EndNotes How to convert endnotes in a text doc to Word endnotes? Dickison Word VBA 4 10-06-2012 09:11 PM
Questions about EndNotes Separating endnotes from text kenglade Word 22 09-14-2012 04:10 PM
Questions about EndNotes Endnotes within Footnotes? elias Word 12 09-04-2012 04:12 PM
Questions about EndNotes Copying endnotes kenglade Word 4 12-03-2011 01:26 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:29 AM.


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