title: Explanation of vba code in a word document having .docm extension
body: <p>I have a Microsoft Word document with <code>.docm</code> format. A first glance it does not contain any macros (as when clicking the following on the ribbon; <code>View</code> -> <code>Macros</code> -> <code>View macros</code> pops up a window having an empty list).</p>
  
  <p>But when enabling the <code>Developer</code> ribbon tab, and clicking the <code>Visual Basic</code> icon there, and then selecting the <code>Document</code> and <code>ContentControlonEnter</code> from the dropdowns in the VB window the following code appears:</p>
  
  <pre><code>Private Sub Document_ContentControlOnEnter(ByVal ContentControl As ContentControl)
  Dim i As Long, j As Long
  With ActiveDocument
    If ContentControl.Title = "Classification" Then
  ContentControl.DropdownListEntries.Clear
  For i = 1 To .ContentControls.Count
    If Left(.ContentControls(i).Title, 5) = "Level" Then
      j = j + 1
      ContentControl.DropdownListEntries.Add Text:=j &amp; " - " &amp; .ContentControls(i).Range.Text
    End If
  Next
    End If
  End With
  End Sub
  </code></pre>
  
  <p>Selecting the other options in the dropdowns give only "blank" code (that is they contain only function declarations followed by the<code>End</code> keyword).</p>
  
  <hr>
  
  <p><strong>My question is what is the code meant to do?</strong></p>
  
  <hr>
  
  <p>*</p>
  
  <ul>
  <li>Details:</li>
  <li>The Word document in question contains hyperlinks to parts of the same document and a couple of links to Word files and Excel files of the same folder. It also contains lots of content control boxes, which I'm guessing is the focus of the code (as the code contains the <code>ContentControl</code> keyword)</li>
  </ul>