Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 837
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
No ActiveX controls when reading 2007 file formats into Excel 2003 Tony Excel Discussion (Misc queries) 0 May 30th 07 07:16 PM
Set Comment formats 'globally'? tskogstrom Excel Discussion (Misc queries) 0 April 16th 07 08:49 AM
pivot table not reading date formats Todd Excel Worksheet Functions 1 July 20th 06 07:01 PM
2 Conditional formats and insert comment - ajit Ajit Munj Excel Discussion (Misc queries) 7 June 4th 05 05:39 AM
Reading Date Formats e.g 20050801 (yyyy/mm/dd) Nathan Excel Discussion (Misc queries) 4 May 25th 05 10:06 AM


All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"