View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Reading Comment Formats

Jerry,
Yes, seems MS missed parts of the object model around
Comments.Characters.Font.
I can set it in code, but not read it (always returns Null), so I guess
someone forgot to implement the Property Get.

Again with the Underline, I can set it with the XL constants
xlUnderlineStyleNone etc, but reading the value is not correct ;
No Underline False
Single Underline xlUnderlineStyleNone
Double Underline False

StrikeThrough appears to work correctly

Whilst this is not directly applicable, as Sharing is not the issue :
http://support.microsoft.com/kb/2117...513&sid=global
it does seem that the effect is the same.

NickHK

"Jerry W. Lewis" wrote in message
...
Is there any way to programmatically recognize individual character

formats
in a comment for superscript, subscript, or double underline?

ActiveCell.Comment.Shape.TextFrame.Characters(i, 1).Font.Superscript
and
ActiveCell.Comment.Shape.TextFrame.Characters(i, 1).Font.Subscript
both exist, but do not appear to be maintained by Excel, since they are
always Null.

ActiveCell.Comment.Shape.TextFrame.Characters(i, 1).Font.Underline
is maintained by Excel, but as a Boolean (which therefore ignores double
underline), unlike
ActiveCell.Comment.Shape.TextFrame.Characters.Font .Underline
which contains values like xlUnderlineStyleNone, xlUnderlineStyleSingle,

and
xlUnderlineStyleDouble

Jerry