Skip to content

Instantly share code, notes, and snippets.

@Zmegolaz
Zmegolaz / comments2xlsx.vb
Last active May 26, 2024 13:47 — forked from razorgoto/comments2xlsx.vb
Exports comments from a MS Word document to Excel and associates them with the heading paragraphs
Sub exportComments()
' Forked from https://gist.github.com/razorgoto/cff2ffd5da93220c643c, updated to work with Library 16.0.
' This also fixes a bug where it crashed if there was a comment on the very first header.
' Exports comments from a MS Word document to Excel and associates them with the heading paragraphs
' they are included in. Useful for outline numbered section, i.e. 3.2.1.5....
' Thanks to Graham Mayor, http://answers.microsoft.com/en-us/office/forum/office_2007-customize/export-word-review-comments-in-excel/54818c46-b7d2-416c-a4e3-3131ab68809c
' and Wade Tai, http://msdn.microsoft.com/en-us/library/aa140225(v=office.10).aspx
' Need to set a VBA reference to "Microsoft Excel 16.0 Object Library". 14.0 works too.
' Go to the Tools Menu, and click "Reference"

Keybase proof

I hereby claim:

  • I am zmegolaz on github.
  • I am zmegolaz (https://keybase.io/zmegolaz) on keybase.
  • I have a public key whose fingerprint is 24A5 6214 5FC9 CDC4 5E17 92B3 BC3D 3ACD A9BF 73D0

To claim this, I am signing this object: