title: How to import the ReadabilityStatistics funtion in this code?
body: <p>I have a code which selects multiple Word files and opens them along with logging their path in an Excel file. This code is linked to a Command Button in an Excel form. The code is given below:</p>
  
  <pre><code> Dim DocStats As String
   Dim WordFileName As String
  
  
    Call Application.FileDialog(msoFileDialogOpen).Filters.Clear
   Call Application.FileDialog(msoFileDialogOpen).Filters.Add( _
   "Word Files Only", "*.docx")
  
   'allow the user to select multiple files
   Application.FileDialog(msoFileDialogOpen).AllowMultiSelect = True
   'make the file dialog visible to the user
   intChoice = Application.FileDialog(msoFileDialogOpen).Show
   'determine what choice the user made
   If intChoice &lt;&gt; 0 Then
  'get the file path selected by the user
  For i = 1 To Application.FileDialog(msoFileDialogOpen _
      ).SelectedItems.Count
      strPath = Application.FileDialog(msoFileDialogOpen _
      ).SelectedItems(i)
      j = Cells(Rows.Count, 1).End(xlUp).Row + 1
      'print the file path to sheet 1
      Cells(j, 1) = strPath
  
      Set WordApp = CreateObject("Word.Application")
      WordApp.Documents.Open strPath
      WordApp.Visible = True
  
      With WordApp.Documents.Content
  
      DocStats = WordApp.ReadabilityStatistics(strPath).Value
      MsgBox DocStats, vbOKOnly, "Hello"
      Cells(j, 2) = DocStats
  
      End With
  
  Next i
  End If
  
  End Sub
  </code></pre>
  
  <p>Now I want to import the ReadabilityStatistics code from <a href="http://word.tips.net/T001784_Only_Showing_Readability_Statistics.html" rel="nofollow">http://word.tips.net/T001784_Only_Showing_Readability_Statistics.html</a> into this code so that along with logging the path, it would also log the readability stats of the word file (s). Please help.</p>