Solved

Add Comments In RTF

Posted on 2003-11-20
5
403 Views
Last Modified: 2010-04-17
hi,
    I am working with a RichTextbox control that doesnot support stylesheets.I
wanted to distinguish the styles by adding comments describing the style before the text with that particular style appears.Is there any control word which specifies comments in RTF. Thanks n advance
0
Comment
Question by:divyap
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 250 total points
ID: 9787728
From: http://www.biblioscape.com/rtf15_spec.htm#Heading58

RTF comments (annotations) have two parts; the author ID (introduced by the control word \atnid) and the annotation text (introduced by the control word \annotation); there is no group enclosing both parts. No Microsoft product supports comments (annotations) within headers, footers, or footnotes. Placing an annotation within headers, footers, or footnotes will often result in a corrupted document. Each part of the annotation is an RTF destination. Comments (annotations) are anchored to the character that immediately precedes the annotation.

If an annotation is associated with an annotation bookmark, the following two destination control words precede and follow the bookmark. The alphanumeric string N, such as a long integer, represents the bookmark name. <atrfstart> '{\*' \atrfstart N '}'
<atrfend> '{\*' \atrfend N '}'



Comments (annotations) have the following syntax: <annot> <annotid> <atnauthor> <atntime>? \chatn <atnicn>? <annotdef>
<annotid> '{\*' \atnid #PCDATA '}'
<atnauthor> '{\*' \atnauthor #PCDATA '}'
<annotdef> '{\*' \annotation <atnref> <para>+ '}'
<atnref> '{\*' \atnref N '}'
<atntime> '{\*' \atntime <time> '}'
<atnicn> '{\*' \atnicn <pict> '}'


An example of annotation text follows:


An example of a paradigm might be Newtonian physics or
Darwinian biology.{\v\fs16 {\atnid bz}\chatn{\*\annotation
\pard\plain \s224 \fs20 {\field{\fldinst page \\#'"Page:
'#'\line'"}{\fldrslt}}{\fs16 \chatn }
How about some examples that deal with social science?
That's what this paper is about.}}

Comments (annotations) may have optional time stamps (contained in the \atntime destination) or icons (contained in the \atnicn destination).

0
 
LVL 22

Expert Comment

by:cookre
ID: 9889015
Is that working for you?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Progress
Introduction to Processes

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question