I am bringing in cell comments from a database. Most of the time they are long and often they are multi-paragraph. I am auto-sizing them:
<pre>dim c as Comment, dArea as Double
for each c in ActiveSheet.Comments
with c
.Shape.TextFrame.AutoSize = True
If .Shape.Width > 300 then
dArea = .Shape.Width * .Shape.Height
.Shape.Width = 300
.Shape.Height = (dArea / 300.0) * 1.2
end if
end with
next c
</pre>
This works great for single paragraphs, but for multi-paragraphs, there is extra space at the end. I can see that this is because the width only applies to a single paragraph, so I guess I'll have to split up the paragraphs and calculate the sum of the heights of each one. Anyone have a better idea? TIA --Sam



