Commenting an RTF file

Posted on 2006-05-19
Last Modified: 2008-02-01
Hi all,

I'm working in an environment where RTF files are used as document templates as part of the application being developed.
Our change control process relies on commenting files, but no-one here knows how to comment an RTF without affecting its appearance.
Is this possible? Is there some kind of invisible comment tag which can be added without changing the output?

Thanks for your help

Question by:bukko
    LVL 46

    Accepted Solution


    What about something like this....

        {This is your comment}



    LVL 65

    Assisted Solution

    do what Tubbs says

    more info


    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).
    LVL 8

    Author Comment

    Thanks guys.
    I should point out that I am asking this for someone else, and I know nothing about RTF.
    I looks like it's not as simple as was hoped.
    I'll pass on your advice though.



    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    scoresClump  challenge 31 88
    scoreUp challenge 14 40
    python question 5 42
    base64 decode encode 12 55
    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 …
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    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…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now