![]() |
Reading Comment Formats
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 |
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 |
Reading Comment Formats
Actually, the way Excel VBA maintains
ActiveCell.Comment.Shape.TextFrame.Characters(i, 1).Font.Underline is even more strange than I thought. If the character is single underlined, then the value of this property is xlUnderlineStyleNone (?????) otherwise the value of this property is False. Jerry "Jerry W. Lewis" wrote: 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 |
All times are GMT +1. The time now is 03:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com