Support » Plugin: Mammoth .docx converter » Strange “a” elements within HTML headings

  • Hi,

    just found Mammoth a couple of days ago and its a great tool which really creates clean HTML code from a Word doc. Nearly perfect. There is just one artifact I don’t understand. The heading elements (h1-h6) it creates from the Word headings contain serveral <a> elements with a strange TOC ids. Looks like this:

    <h1><a id="_Toc48228035"></a><a id="_Toc48288791"></a><a id="_Toc48303673"></a><a id="_Toc48306159"></a><a id="_Toc48308644"></a><a id="_Toc48311128"></a><a id="_Toc48313611"></a>Arteriosklerose</h1>

    Does anybody know how the get rid of this?

    Thanks in advance

    Cheers,
    Peter

    • This topic was modified 8 months, 2 weeks ago by peterebel.
    • This topic was modified 8 months, 2 weeks ago by peterebel.
    • This topic was modified 8 months, 2 weeks ago by peterebel.
    • This topic was modified 8 months, 2 weeks ago by peterebel.
    • This topic was modified 8 months, 2 weeks ago by peterebel.
    • This topic was modified 8 months, 2 weeks ago by peterebel.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Williamson

    (@michaelwilliamson)

    Bookmarks in the document are converted to anchors in the HTML output. If you get rid of the bookmarks in the original document, then the corresponding anchors shouldn’t appear in the output.

    Would love to see an option or ability via an action to remove these from being inserted.

    Sometimes its not viable to remove anchors from the originating documents, especially when producing content on scale and they are needed for pre-publishing editing.

    Thread Starter peterebel

    (@peterebel)

    The following Word macro does the job:

    Sub RemoveAllBookmarks()
        Dim objBookmark As Bookmark
        For Each objBookmark In ActiveDocument.Bookmarks
            objBookmark.Delete
        Next
    End Sub
    • This reply was modified 8 months ago by peterebel.
    • This reply was modified 8 months ago by peterebel.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Strange “a” elements within HTML headings’ is closed to new replies.