title: How to write a function that scales fonts automatically in vba
body: <p>I want a function can be scale fonts'size automatically to one row.
  I know the following code can be scale manual</p>
  
  <pre><code>With .Paragraphs.First.Range.Font.Scaling = 41
  end with
  </code></pre>
  
  <p>and I try to get the font's width,and calc the font spacing
  but not the best solution</p>
  
  <pre><code>With .PageSetup
  .PageWidth = CentimetersToPoints(21)               
  .LeftMargin = CentimetersToPoints(2.8)              
  .RightMargin = CentimetersToPoints(2.6)
  end with  
  with 
  .Paragraphs.First.Range.font.size = 60            
  .Range.Font.Spacing = CentimetersToPoints(15.6) - (180 ^ (1 / 2)) * (.Range.Characters.Count - 1)) / (.Range.Characters.Count - 2)     'not correct
  </code></pre>
  
  <p>who can give the Complete and good code.
  I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this. </p>