Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
No ActiveX controls when reading 2007 file formats into Excel 2003 | Excel Discussion (Misc queries) | |||
Set Comment formats 'globally'? | Excel Discussion (Misc queries) | |||
pivot table not reading date formats | Excel Worksheet Functions | |||
2 Conditional formats and insert comment - ajit | Excel Discussion (Misc queries) | |||
Reading Date Formats e.g 20050801 (yyyy/mm/dd) | Excel Discussion (Misc queries) |