title: Extract positions of bold words with Python
body: <p>I would like to extract the position of bold words detected in a .docx file.</p>
  
  <p>For that, I have used docx library, and it successfully detects the words with bold format. However, is not very useful to extract only the word, since you may find the same word, but in another format.</p>
  
  <p>For example:</p>
  
  <p>Let's assume that my file.docx contains :
  "My <strong>cat</strong> is not a normal cat"</p>
  
  <pre><code>from docx import *
  
  document = Document('/path/to/file.docx')
              def bold(document):
                  for para in document.paragraphs:
                      Listbolds = []
                      for run in para.runs:
                          if run.bold:
                              print run.text
                              word = run.text
                              Listbolds.append(word)
                  return Listbolds
  </code></pre>
  
  <p>This function would give me the word "cat" as output. However, if I try to filter my text by those words which are not bold, and I use this, I would eliminate also the second "cat", which is not bold.</p>
  
  <p>Any idea about how to get only the position of this word? 
  For exaple, to obtain 2 as the word position.</p>
  
  <p>Thank you all!</p>