Solved

Add Comments In RTF

Posted on 2003-11-20
5
386 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
  • 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Image decoding from Camera 3 89
Hide vba in gp 7 95
Please explain: Aspect Oriented Programming 2 95
This code tracks birthdays 3 74
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

832 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