View Single Post
 
Old 11-14-2013, 03:10 PM
fumei fumei is offline Windows 7 64bit Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

It is because some of your bookmarks (most of them, as the count goes from 62 in the original, down to 16 after your sort) include the paragraph BEFORE the heading your sorting. That is the starting (opening) marker of the bookmark includes the previous paragraph. Here is the result of running the following code.
Code:
Sub BM_Count()
Dim SourceDoc As Document
Dim CountDoc As Document
Dim var
Code:
Set SourceDoc = Documents("Glossary Sorted.doc")
Set CountDoc = Documents("BMCount.doc")
For var = 1 To SourceDoc.Bookmarks.Count
   CountDoc.Range.InsertAfter SourceDoc.Bookmarks(var).Name & vbCrLf
Next
End Sub 
This simply listed the bookmarks names into a document so I could see them at a glance. The following shows the result of the original sort killing lots of bookmaks, and the result after I fixed a few paragraph marks.
AccessPoint
ADConverter
Album
Analogue
AnalogueDomain
ASide
AudioFileFormats
AutoTune
BinaryCode
BitDepth
BottomUp
BSide
ClickTrack
Cloud
Code
CognitiveStyle
CollectiveIntelligence
CommunalProduction
ConventionalProduction
DAConverter
DAW
Digital
DigitalConvergence
DigitalCulture
DigitalDomain
DigitalForensics
DigitalHumanities
DigitalLifestream
DigitalProduction
FolkProcess
GuideTrack
HybridProduction
ID3
LPrecord
Many2Many
Mashup
MassMediaProduction
Media
MetaData
MP3
One2Many
OralTradition
PitchShift
PrintCulture
Process
Product
ReadOnly
ReadWrite
Remix
RemixCulture
SampleRate
ScratchTrack
Single
SPARScodes
Stem
Tags
TimeShift
TopDown
Track
TransitionalProduction
twentiethCenturyProduction
VinylRecord


Afterwards (original sort FAR fewer)

Analogue
AnalogueDomain
BSide
ClickTrack
CollectiveIntelligence
CommunalProduction
Digital
DigitalConvergence
DigitalCulture
DigitalDomain
DigitalProduction
MassMediaProduction
PrintCulture
ReadOnly
twentiethCenturyProduction
VinylRecord

Afterwards (fixing a few sample paragraph marks)
AccessPoint
Album
Analogue
AnalogueDomain
ASide
BinaryCode
BSide
ClickTrack
Cloud
CollectiveIntelligence
CommunalProduction
Digital
DigitalConvergence
DigitalCulture
DigitalDomain
DigitalProduction
FolkProcess
MassMediaProduction
OralTradition
PrintCulture
ReadOnly
Single
twentiethCenturyProduction
VinylRecord

So, for example the bookmark Binary Code is lost. So go there and look. Oh...make sure your have Bookmarks listed as Visible - They look like grey square brackets. As you can see the opening bracket of the bookmark Binary code includes the previous paragraph. And as you can see from the original sort, it is lost. If you simply delete the paragraph - just to the right of the opening bookmark...ummm, mark - and run the sort, it now IS still there.

I did a few just to test if this worked, and AFAIK, it does. I am not going to edit and fix your document for you. Just delete the paragraphs before the heading that is supposed to be in the bookmark.

NOTE! There are many instances where the bookmark closing mark (or tag if you will) includes a following paragraph (as opposed to a previous one). This does NOT affect the sort and the bookmarks. You can leave them if you want.
Reply With Quote