Hidden Bookmarks and Smashwords

Ray McCarthy

Sentient Marmite: The Truth may make you fret.
Joined
Jul 16, 2014
Messages
8,090
Location
The Mid West (of Ireland)
You need an MSWord document for Smashwords.

They'll fail it if it has "hidden bookmarks".

These can appear without you adding them!

Note: There is NO REASON AT ALL why you'd want ANY kind of bookmarks in a Word document for publisher / agent / ebook / POD etc. They are not the same thing as anchors or hyperlinks.

1) You put Word Generated TOC (Contents page) for CreateSpace or draft print or other reason.
2) You delete it for eBook file, as page numbers make no sense, CreateSpace wants a list of hyperlinked contents. Unfortunately MS Word leaves behind "hidden" bookmarks.

You often can't see them in other programs!
You usually have to go to Insert Bookmark, untick hidden, tick hidden etc to see them and delete one at a time. Tedious!

MS Support suggests this may be a bug and offers the following VB code you can add to normal.dot using the built in Visual Basic editor. You only need to add Method 2:
Copy and paste including Sub to End Sub and save.
Code:
Method 1: Code to Strip All Bookmarks from a Document


     Sub StripAllBookmarks()
      Dim stBookmark As Bookmark
      ActiveDocument.Bookmarks.ShowHidden = True
      If ActiveDocument.Bookmarks.Count >= 1 Then
         For Each stBookmark In ActiveDocument.Bookmarks
            stBookmark.Delete
         Next stBookmark
      End If
   End Sub

Method 2: Code to Strip Only Hidden Bookmarks from a Document


Sub StripHiddenBookmarks()
      Dim stBookmark As Bookmark
      ActiveDocument.Bookmarks.ShowHidden = True
      If ActiveDocument.Bookmarks.Count >= 1 Then
         For Each stBookmark In ActiveDocument.Bookmarks
           If Left(stBookmark, 1) = "_" Then
              stBookmark.Delete
           End If
        Next stBookmark
      End If
   End Sub
              

Method 3: Code to Add a Hidden Bookmark
The following code adds a bookmark named "_HiddenBookmark1" to a document at the location of the insertion point or selection.


   Sub AddHiddenBookmark
      ActiveDocument.Bookmarks.Add Name:="_HiddenBookmark1"
   End Sub
 
Okay.

Not sure exactly what you are suggesting here; but I do know that if I generate my own table of contents I usually use bookmarks and then hyperlinks to those bookmarks.

I just checked this and did notice that once I have generated those if I use them--let's say I want to test them--they generate hidden bookmarks every time I click on them. So, If I am getting errors from Smashwords then I should remove those hidden bookmarks.
Perhaps?

Then I should refrain from mucking around with the hyperlinks and upload to smashwords. Oddly enough I don't recall having difficulty with this either time I uploaded. (I always test the hyperlinks.) I shall watch for this in the future.
 
If I am getting errors from Smashwords then I should remove those hidden bookmarks.
Perhaps ... though the MS script removed my manual table of content links too.

If it's not broken, don't break it! If Smashwords accepts it for premium, then they are happy.

With Amazon you go to KDP settings and near bottom of page there is a link for free download of book to test it on a Kindle.
With Smashwords the Author free download links for all the versions are obvious.

I have both a Kindle and Kobo eInk Readers so I can make sure the books "work". I have Aldiko for epub on phone (the Kindle App wants to "call home" all the time, even when not loaded. I have no data enabled via Mobile on phone ever and rarely enable WiFi)

All I know is that the first two books I uploaded to Smashwords were fine. The third one is giving me grief. Amazon's MS Word Conversion and Calibre's "odt" OpenOffice/LibreOffice conversion has no issues. Calibre converts MSWord on Windows by using the built in MS Office Word to HTML tool and then using the HTML file.
 
There is definitely a problem with word since if I test the hyperlink it creates a hidden bookmark, which seems unnecessary. I can test the same hyperlink five times and it creates five instances of hidden bookmarks, so that's like a virus and no longer just 'seems' unnecessary.
 
Using a VB code to fix a microsoft error seems rather dubious.
mecw1.jpg
 

Similar threads


Back
Top