Document Area

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

 

Once the RTF header is defined, the RTF reader has enough information to correctly read the actual document text. The document area has the following syntax.

<document> <info>? <docfmt>* <section>+

Information Group

The \info control word introduces the information group, which contains information about the document. This can include the title, author, keywords, comments, and other information specific to the file. This information is for use by a document-management utility, if available.

This group has the following syntax:

<info> '{' <title>? & <subject>? & <author>? & <manager>? & <company>? <operator>? & <category>? & <keywords>? & <comment>? & \version? & <doccomm>? & \vern? & <creatim>? & <revtim>? & <printim>? & <buptim>? & \edmins? & \nofpages? & \nofwords? \nofchars? & \id? '}'
<title> '{' \title #PCDATA '}'
<subject> '{' \subject #PCDATA '}'
<author> '{' \author #PCDATA '}'
<manager> {' \manager #PCDATA '}'
<company> {' \company #PCDATA '}'
<operator> '{' \operator #PCDATA '}'
<category> {' \category #PCDATA '}'
<keywords> '{' \keywords #PCDATA '}'
<comment> '{' \comment #PCDATA '}'
<doccomm> '{' \doccomm #PCDATA '}'
<hlinkbase> '{' \hlinkbase #PCDATA '}'
<creatim> '{' \creatim <time> '}'
<revtim> '{' \revtim <time> '}'
<printim> '{' \printim <time> '}'
<buptim> '{' \buptim <time> '}'
<time> \yr? \mo? \dy? \hr? \min? \sec?

Some applications, such as Word, ask the user to type this information when saving the document in its native format. If the document is then saved as an RTF file or translated into RTF, the RTF writer specifies this information using the following control words. These control words are destinations and both the control words and the text should be enclosed in braces ({ }).

Control
Word
Meaning
\title Title of the document. This is a destination control word.
\subject Subject of the document. This is a destination control word.
\author Author of the document. This is a destination control word.
\manager Manager of the author. This is a destination control word.
\company Company of the author. This is a destination control word
\operator Person who last made changes to the document. This is a destination control word.
\category Category of the document. This is a destination control word.
\keywords Selected keywords for the document. This is a destination control word.
\comment Comments; text is ignored. This is a destination control word.
\versionN Version number of the document.
\doccomm Comments displayed in the Summary Info or Properties dialog box in Word. This is a destination control word.
\hlinkbase The base address that is used for the path of all relative hyperlinks inserted in the document. This can be a path or an Internet address (URL).

The \userprops control word introduces the user-defined document properties. Unique \propname control words define each user-defined property in the document. The group has the following syntax:

<userprops> '{\*' \userprops ('{' <propinfo> '}'*) '}'
<propinfo> <propname> <proptype> <staticval> <linkval>?
<propname> '{'  \propname #PCDATA '}'
<proptype> \proptype
<staticval> \staticval
<linkval> \linkval
Control
Word
Meaning
\propname The name of the user-defined property.
\staticval The value of the property.
\linkval The name of a bookmark that contains the text to display as the value of the property.
\proptypeN Specifies the type of the property:

3Integer

5Real number

7Date

11Boolean

30Text

The RTF writer may automatically enter other control words, including the following:

Control
Word
Meaning
\vernN Internal version number
\creatim Creation time
\revtim Revision time
\printim Last print time
\buptim Backup time
\edminsN Total editing time (in minutes)
\yrN Year
\moN Month
\dyN Day
\hrN Hour
\minN Minute
\secN Seconds
\nofpagesN Number of pages
\nofwordsN Number of words
\nofcharsN Number of characters including spaces
\nofcharswsN Number of characters not including spaces
\idN Internal ID number

Any control word described in the previous table that does not have a numeric parameter specifies a date; all dates are specified with the \yr \mo \dy \hr \min \sec controls. An example of an information group follows:

{\info{\title Template}{\author John Doe}{\operator JOHN DOE}
{\creatim\yr1999\mo4\dy27\min1}{\revtim\yr1999\mo4\dy27\min1}
{\printim\yr1999\mo3\dy17\hr23\min5}{\version2}{\edmins2}{\nofpages183}
{\nofwords53170}{\nofchars303071}{\*\company Microsoft}
{\nofcharsws372192}{\vern8247}}

Document Formatting Properties

After the information group (if there are any), there may be some document formatting control words (described as <docfmt> in the document area syntax description). These control words specify the attributes of the document, such as margins and footnote placement. These attributes must precede the first plain-text character in the document.

The control words that specify document formatting are listed in the following table (measurements are in twips; a twip is one-twentieth of a point). For omitted control words, RTF uses the default values.

Control
Word
Meaning
\deftabNDefault tab width in twips (the default is 720).
\hyphhotzNHyphenation hot zone in twips (the amount of space at the right margin in which words are hyphenated).
\hyphconsecNN is the maximum number of consecutive lines that will be allowed to end in a hyphen. 0 means no limit.
\hyphcapsToggles hyphenation of capitalized words (the default is on). Append 1 or leave control word by itself to toggle property on; append 0 to turn it off.
\hyphautoToggles automatic hyphenation (the default is off). Append 1 or leave control word by itself to toggle property on; append 0 to turn it off.
\linestartNBeginning line number (the default is 1).
\fracwidthUses fractional character widths when printing (QuickDraw only).
\*\nextfileThe argument is the name of the file to print or index next; it must be enclosed in braces. This is a destination control word.
\*\templateThe argument is the name of a related template file; it must be enclosed in braces. This is a destination control word.
\makebackupBackup copy is made automatically when the document is saved.
\defformatTells the RTF reader that the document should be saved in RTF format.
\psoverPrints PostScript over the text.
\doctempDocument is a boilerplate document. For Word for Windows, this is a template; for Word for the Macintosh, this is a stationery file.
\deflangNDefines the default language used in the document used with a \plain control word. See the section on Font (Character) Formatting Properties in this RTF Specification for a list of possible values for N.
\deflangfeNDefault language ID for Asian/Middle Eastern text in Word.
\windowcaptionSets the caption text for the document window. This is a string value.
\doctypeNAn integer (0-2) that describes the document type for AutoFormat.

0General Document (for formatting most documents, the default)

1Letter (for formatting letters, and used by Letter Wizard)

2E-mail (for formatting e-mail, and used by WordMail)

\fromtextIndicates document was originally plain text.
\fromhtmlIndicates the document was originally HTML and may contain encapsulated HTML tags. This keyword may be followed by a version number (currently 1).
\horzdocHorizontal rendering.
\vertdocVertical rendering.
\jcompressCompressing justification (default).
\jexpandExpanding justification.
\lnongridDefine line based on the grid.
Document Views and Zoom Level
\viewkindNAn integer (0-5) that represents the view mode of the document.

0None

1Page Layout view

2Outline view

3Master Document view

4Normal view

5Online Layout view

\viewscaleN Zoom level of the document; the N argument is a value representing a percentage (the default is 100).
\viewzkNAn integer (0 to 2) that represents the zoom kind of the document.

0None

1Full page

2Best fit

\privateObsolete destination. It has no leading \*. It should be skipped.
Footnotes and Endnotes
\fetNFootnote/endnote type. This indicates what type of notes are present in the document.

0Footnotes only or nothing at all (the default).

1Endnotes only.

2Footnotes and endnotes both.

For backward compatibility, if \fet1 is emitted, \endnotes or \enddoc will be emitted together with \aendnotes or \aenddoc. RTF readers that understand \fet will need to ignore the footnote-positioning control words, and use the endnote control words instead.

\ftnsepText argument separates footnotes from the document. This is a destination control word.
\ftnsepcText argument separates continued footnotes from the document. This is a destination control word.
\ftncnText argument is a notice for continued footnotes. This is a destination control word.
\aftnsepText argument separates endnotes from the document. This is a destination control word.
\aftnsepcText argument separates continued endnotes from the document. This is a destination control word.
\aftncnText argument is a notice for continued endnotes. This is a destination control word.
\endnotesFootnotes at the end of the section (the default).
\enddocFootnotes at the end of the document.
\ftntjFootnotes beneath text (top justified).
\ftnbjFootnotes at the bottom of the page (bottom justified).
\aendnotesEndnotes at end of section (the default).
\aenddocEndnotes at end of document.
\aftnbjEndnotes at bottom of page (bottom justified).
\aftntjEndnotes beneath text (top justified).
\ftnstartNBeginning footnote number (the default is 1).
\aftnstartNBeginning endnote number (the default is 1).
\ftnrstpgRestart footnote numbering each page.
\ftnrestartFootnote numbers restart at each section. Microsoft Word for the Macintosh uses this control to restart footnote numbering at each page.
\ftnrstcontContinuous footnote numbering (the default).
\aftnrestartRestart endnote numbering each section.
\aftnrstcontContinuous endnote numbering (the default).
\ftnnarFootnote numbering—Arabic numbering (1, 2, 3, ...)
\ftnnalcFootnote numbering—Alphabetic lowercase (a, b, c, ...)
\ftnnaucFootnote numbering—Alphabetic uppercase (A, B, C, ...)
\ftnnrlcFootnote numbering—Roman lowercase (i, ii, iii, ...)
\ftnnrucFootnote numbering—Roman uppercase (I, II, III, ...)
\ftnnchiFootnote numbering—Chicago Manual of Style (*, †, ‡, §)
\ftnnchosungFootnote Korean numbering 1 (*chosung).
\ftnncnumFootnote Circle numbering (*circlenum).
\ftnndbnumFootnote Kanji numbering without the digit character (*dbnum1).
\ftnndbnumdFootnote Kanji numbering with the digit character (*dbnum2).
\ftnndbnumtFootnote Kanji numbering 3 (*dbnum3).
\ftnndbnumkFootnote Kanji numbering 4 (*dbnum4).
\ftnndbarFootnote double-byte numbering (*dbchar).
\ftnnganadaFootnote Korean numbering 2 (*ganada).
\ftnngbnumFootnote Chinese numbering 1 (*gb1).
\ftnngbnumdFootnote Chinese numbering 2 (*gb2).
\ftnngbnumlFootnote Chinese numbering 3 (*gb3).
\ftnngbnumkFootnote Chinese numbering 4 (*gb4).
\ftnnzodiacFootnote numbering— Chinese Zodiac numbering 1 (* zodiac1)
\ftnnzodiacdFootnote numbering— Chinese Zodiac numbering 2 (* zodiac2)
\ftnnzodiaclFootnote numbering— Chinese Zodiac numbering 3 (* zodiac3)
\aftnnarEndnote numbering—Arabic numbering (1, 2, 3, ...)
\aftnnalcEndnote numbering—Alphabetic lowercase (a, b, c, ...)
\aftnnaucEndnote numbering—Alphabetic uppercase (A, B, C, ...)
\aftnnrlcEndnote numbering—Roman lowercase (i, ii, iii, ...)
\aftnnrucEndnote numbering—Roman uppercase (I, II, III, ...)
\aftnnchiEndnote numbering—Chicago Manual of Style (*, †, ‡, §)
\aftnnchosungEndnote Korean numbering 1 (*chosung).
\aftnncnumEndnote Circle numbering (*circlenum).
\aftnndbnumEndnote Kanji numbering without the digit character (*dbnum1).
\aftnndbnumdEndnote Kanji numbering with the digit character (*dbnum2).
\aftnndbnumtEndnote Kanji numbering 3 (*dbnum3).
\aftnndbnumkEndnote Kanji numbering 4 (*dbnum4).
\aftnndbarEndnote double-byte numbering (*dbchar).
\aftnnganadaEndnote Korean numbering 2 (*ganada).
\aftnngbnumEndnote Chinese numbering 1 (*gb1).
\aftnngbnumdEndnote Chinese numbering 2 (*gb2).
\aftnngbnumlEndnote Chinese numbering 3 (*gb3).
\aftnngbnumkEndnote Chinese numbering 4 (*gb4).
\aftnnzodiacEndnote numbering— Chinese Zodiac numbering 1 (* zodiac1)
\aftnnzodiacdEndnote numbering— Chinese Zodiac numbering 2 (* zodiac2)
\aftnnzodiaclEndnote numbering— Chinese Zodiac numbering 3 (* zodiac3).
Page Information
\paperwNPaper width in twips (the default is 12,240).
\paperhNPaper height in twips (the default is 15,840).
\pszNUsed to differentiate between paper sizes with identical dimensions under Microsoft Windows NT®. Values 1–41 correspond to paper sizes defined in DRIVINI.H in the Windows 3.1 SDK (DMPAPER_ values). Values greater than or equal to 42 correspond to user-defined forms under Windows NT.
\marglNLeft margin in twips (the default is 1800).
\margrNRight margin in twips (the default is 1800).
\margtNTop margin in twips (the default is 1440).
\margbNBottom margin in twips (the default is 1440).
\facingpFacing pages (activates odd/even headers and gutters).
\gutterNGutter width in twips (the default is 0).
\rtlgutterGutter is positioned on the right
\gutterprlParallel gutter.
\margmirrorSwitches margin definitions on left and right pages. Used in conjunction with \facingp.
\landscapeLandscape format.
\pgnstartNBeginning page number (the default is 1).
\widowctrlEnable widow and orphan control.
\twoononePrint two logical pages on one physical page.
Linked Styles
\linkstylesUpdate document styles automatically based on template.
Compatibility Options
\notabindDon't add automatic tab stop for hanging indent.
\wraptrspWrap trailing spaces onto the next line.
\prcolblPrint all colors as black.
\noextrasprlDon't add extra space to line height for showing raised/lowered characters.
\nocolbalDon't balance columns.
\cvmmeTreat old-style escaped quotation marks (\") as current style ("") in mail merge data documents.
\sprstspSuppress extra line spacing at top of page. Basically, this means to ignore any line spacing larger than Auto at the top of a page.
\sprsspbfSuppress space before paragraph property after hard page or column break.
\otblrulCombine table borders as done in Word 5.x for the Macintosh. Contradictory table border information is resolved in favor of the first cell.
\transmfMetafiles are considered transparent; don't blank the area behind metafiles.
\ swpbdrIf a paragraph has a left border (not a box) and the Different Odd And Even or Mirror Margins check box is selected, Word will print the border on the right for odd-numbered pages.
\brkfrmShow hard (manual) page breaks and column breaks in frames.
\sprslnspSuppress extra line spacing like WordPerfect version 5.x.
\subfontbysizeSubstitute fonts based on size first.
\truncatefont
height
Round down to the nearest font size instead of rounding up.
\truncexDon't add leading (extra space) between rows of text
\bdbfhdrPrint body before header/footer. Option for compatibility with Word for the Macintosh 5.x.
\dntblnsbdbDon't balance single-byte character set (SBCS)/double-byte character set (DBCS) characters. Option for compatibility with Word 6.0 (Japanese).
\expshrtnExpand character spaces on line ending with SHIFT+RETURN. Option for compatibility with Word 6.0 (Japanese).
\lytexcttpDon't center exact line height lines.
\lytprtmetUse printer metrics to lay out document.
\msmcapSmall caps like Word for the Macintosh 5.x.
\noleadNo external leading. Option for compatibility with Word for the Macintosh 5.x
\nospaceforulDon't add space for underline. Option for compatibility with Word 6.0 (Japanese).
\noultrlspcDon't underline trailing spaces. Option for compatibility with Word 6.0 (Japanese).
\noxlattoyenDon't translate backslash to Yen sign. Option for compatibility with Word 6.0 (Japanese).
\oldlinewrapLines wrap like Word 6.0.
\sprsbspSuppress extra line spacing at bottom of page.
\sprstsmDoes nothing. This keyword should be ignored.
\wpjstDo full justification like WordPerfect 6.x for Windows.
\wpspSet the width of a space like WordPerfect 5.x.
\wptabAdvance to next tab stop like WordPerfect 6.x.
\splytwnineDon't lay out AutoShapes like Word 97.
\ftnlytwnineDon't lay out footnotes like Word 6.0/95/97.
\htmautspUse HTML paragraph auto spacing.
\useltbalnDon't forget last tab alignment.
\alntblindDon't align table rows independently.
\lytcalctblwdDon't lay out tables with raw width.
\lyttblrtgrDon't allow table rows to lay out apart.
\oldasUse Word 95 Auto spacing.
\lnbrkruleDon't use Word 97 line breaking rules for Asian text.
\bdrrlswsixUse Word 6.0/95 borders rules.
\nolnhtadjtblDon't adjust line height in table.
Forms
\formprotThis document is protected for forms.
\allprotThis document has no unprotected areas.
\formshadeThis document has form field shading on.
\formdispThis document currently has a forms drop-down box or check box selected.
\printdataThis document has print form data only on.
Revision Marks
\revprotThis document is protected for revisions. The user can edit the document, but revision marking cannot be disabled.
\revisionsTurns on revision marking.
\revpropNArgument indicates how revised text will be displayed:

0no properties shown

1bold

2 italic

3 underline (default)

4 double underline.

\revbarNVertical lines mark altered text, based on the argument:

0no marking;

1left margin

2 right margin

3 outside (the default: left on left pages, right on right pages).

Comments (Annotations)
\annotprotThis document is protected for comments (annotations). The user cannot edit the document but can insert comments (annotations).
Bidirectional Controls
\rtldocThis document will be formatted to have Arabic-style pagination.
\ltrdocThis document will have English-style pagination (the default).
Click-and-Type
\ctsNIndex to the style to be used for Click-and-Type (0 is the default).
Kinsoku characters (Far East)
\jsksuIndicates that the strict Kinsoku set must be used for Japanese; \jsku should not be present if \ksulangN is present and the language N is Japanese.
\ksulangNIndicates what language N the customized kinsoku characters defined in the \fchars and \lchars destinations belong to.
\*\fcharsList of following kinsoku characters.
\*\lcharsList of leading kinsoku characters.
Drawing Grid
\dghspaceNDrawing grid horizontal spacing in twips (the default is 120).
\dgvspaceNDrawing grid vertical spacing in twips (the default is 120).
\dghoriginNDrawing grid horizontal origin in twips (the default is 1701).
\dgvoriginNDrawing grid vertical origin in twips (the default is 1984).
\dghshowNShow Nth horizontal gridline (the default is 3).
\dgvshowNShow Nth vertical gridline (the default is 0).
\dgsnapSnap to drawing grid.
\dgmarginDrawing grid to follow margins.

Note that the three document-protection control words (\formprot, \revprot, and \annotprot) are mutually exclusive; only one of the three can apply to any given document. Also, there is currently no method for storing passwords in RTF, so any document that associates a password with a protection level will lose the password protection in RTF.

For more information about bidirectional controls, see the section on Bidirectional Language Support in this RTF Specification.

Page Borders
\pgbrdrheadPage border surrounds header.
\pgbrdrfootPage border surrounds footer.
\pgbrdrtPage border top.
\pgbrdrbPage border bottom.
\pgbrdrlPage border left.
\pgbrdrrPage border right.
\brdrartNPage border art; the N argument is a value from 1-165 representing the number of the border.
\pgbrdroptN8Page border measure from text. Always display in front option is set to off.

32Page border measure from edge of page. Always display in front option is set to on.

40Page border measure from edge of page. Always display in front option is set to off.

\pgbrdrsnapAlign paragraph borders and table edges with page border.

The color, width, border style, and border spacing keywords for page borders are the same as the keywords defined for paragraph borders.

Section Text

Each section in the RTF file has the following syntax:

<section> <secfmt>* <hdrftr>? <para>+ (\sect <section>)?

Section Formatting Properties

At the beginning of each section, there may be some section-formatting control words (described as <secfmt> in the section text syntax description). These control words specify section-formatting properties, which apply to the text following the control word, with the exception of the section-break control words (those beginning with \sbk). Section-break control words describe the break preceding the text. These control words can appear anywhere in the section, not just at the start.

Note

   

If the \sectd control word is not present, the current section inherits all section properties defined in the previous section.

The section-formatting control words are listed in the following table.

Control
Word
Meaning
\sectNew section.
\sectdReset to default section properties.
\endnhereEndnotes included in the section.
\binfsxnNN is the printer bin used for the first page of the section. If this control is not defined, then the first page uses the same printer bin as defined by the \binsxnN control.
\binsxnNN is the printer bin used for the pages of the section.
\dsNDesignates section style. If a section style is specified, style properties must be specified with the section.
\pnseclvlNUsed for multilevel lists. This property sets the default numbering style for each corresponding \pnlvlN control word (bullets and numbering property for paragraphs) within that section. This is a destination control word.
\sectunlockedThis section is unlocked for forms.
Section Break
\sbknoneNo section break.
\sbkcolSection break starts a new column.
\sbkpageSection break starts a new page (the default).
\sbkevenSection break starts at an even page.
\sbkoddSection break starts at an odd page.
Columns
\colsNNumber of columns for "snaking" (the default is 1).
\colsxNSpace between columns in twips (the default is 720).
\colnoN Column number to be formatted; used to specify formatting for variable-width columns.
\colsrN Space to right of column in twips; used to specify formatting for variable-width columns.
\colwN Width of column in twips; used to override the default constant width setting for variable-width columns.
\linebetcolLine between columns.
Line Numbering
\linemodNLine-number modulus amount to increase each line number (the default is 1).
\linexNDistance from the line number to the left text margin in twips (the default is 360). The automatic distance is 0.
\linestartsNBeginning line number (the default is 1).
\linerestartLine numbers restart at \linestarts value.
\lineppageLine numbers restart on each page.
\linecontLine numbers continue from the preceding section.
Page Information
\pgwsxnNN is the page width in twips. A \sectd resets the value to that specified by \paperwN in the document properties.
\pghsxnNN is the page height in twips. A \sectd resets the value to that specified by \paperhN in the document properties.
\marglsxnNN is the left margin of the page in twips. A \sectd resets the value to that specified by \marglN in the document properties.
\margrsxnNN is the right margin of the page in twips. A \sectd resets the value to that specified by \margrN in the document properties.
\margtsxnNN is the top margin of the page in twips. A \sectd resets the value to that specified by \margtN in the document properties.
\margbsxnNN is the bottom margin of the page in twips. A \sectd resets the value to that specified by \margbN in the document properties.
\guttersxnNN is the width of the gutter margin for the section in twips. A \sectd resets the value to that specified by \gutterN from the document properties. If Facing Pages is turned off, the gutter will be added to the left margin of all pages. If Facing Pages is turned on, the gutter will be added to the left side of odd-numbered pages and the right side of even-numbered pages.
\margmirsxnSwitches margin definitions on left and right pages. Used in conjunction with \facingp.
\lndscpsxnPage orientation is in landscape format. To mix portrait and landscape sections within a document, the \landscape control should not be used so that the default for a section is portrait, which may be overridden by the \lndscpsxn control.
\titlepgFirst page has a special format.
\headeryNHeader is N twips from the top of the page (the default is 720).
\footeryNFooter is N twips from the bottom of the page (the default is 720).
Page Numbers
\pgnstartsNBeginning page number (the default is 1).
\pgncontContinuous page numbering (the default).
\pgnrestartPage numbers restart at \pgnstarts value.
\pgnxNPage number is N twips from the right margin (the default is 720). This control word is understood but not used by current versions (6.0 or later) of Word.
\pgnyNPage number is N twips from the top margin (the default is 720). This control word is understood but not used by current versions (6.0 or later) of Word.
\pgndecPage-number format is decimal.
\pgnucrmPage-number format is uppercase roman numeral.
\pgnlcrmPage-number format is lowercase roman numeral.
\pgnucltrPage-number format is uppercase letter.
\pgnlcltrPage-number format is lowercase letter.
\pgnbidiaPage-number format is Abjad Jawaz if language is Arabic and Biblical Standard if language is Hebrew.
\pgnbidibPage-number format is Alif Ba Tah if language is Arabic and Non-standard Decimal if language is Hebrew.
\pgnchosungKorean numbering 1 (* chosung).
\pgncnumCircle numbering (*circlenum).
\pgndbnumKanji numbering without the digit character.
\pgndbnumdKanji numbering with the digit character.
\pgndbnumtKanji numbering 3 (*dbnum3).
\pgndbnumkKanji numbering 4 (*dbnum4).
\pgndecdDouble-byte decimal numbering.
\pgnganadaKorean numbering 2 (*ganada)
\pgngbnumChinese numbering 1 (*gb1).
\pgngbnumdChinese numbering 2 (*gb2).
\pgngbnumlChinese numbering 3 (*gb3).
\pgngbnumkChinese numbering 4 (*gb4).
\pgnzodiacChinese Zodiac numbering 1 (*zodiac1).
\pgnzodiacdChinese Zodiac numbering 2 (*zodiac2).
\pgnzodiaclChinese Zodiac numbering 3 (*zodiac3).
\pgnhnN Indicates which heading level is used to prefix a heading number to the page number. This control word can only be used in conjunction with numbered heading styles. 0 specifies to not show heading level (the default). Values 1-9 correspond to heading levels 1 through 9.
\pgnhnshHyphen separator character. This separator and the successive ones appear between the heading level number and the page number.
\pgnhnspPeriod separator character.
\pgnhnscColon separator character.
\pgnhnsmEm-dash (—) separator character.
\pgnhnsnEn-dash (–) separator character.
Vertical Alignment
\vertaltText is top-aligned (the default).
\vertalbText is bottom-aligned.
\vertalcText is centered vertically.
\vertaljText is justified vertically.
Bidirectional Controls
\rtlsectThis section will snake (newspaper style) columns from right to left.
\ltrsectThis section will snake (newspaper style) columns from left to right (the default).
Asian Controls
\horzsectHorizontal rendering.
\vertsectVertical rendering.
Text Flow
\stextflowSection property for specifying text flow.

0Text flows left to right and top to bottom

1Text flows top to bottom and right to left, vertical

2Text flows left to right and bottom to top

3Text flows right to left and top to bottom

4Text flows left to right and top to bottom, vertical

5Text flows vertically, non-vertical font

Page Borders
\pgbrdrheadPage border surrounds header.
\pgbrdrfootPage border surrounds footer.
\pgbrdrtPage border top.
\pgbrdrbPage border bottom.
\pgbrdrlPage border left.
\pgbrdrrPage border right.
\brdrartNPage border art; the N argument is a value from 1-165 representing the number of the border.
\pgbrdroptN8Page border measure from text. Always display in front option is set to off.

32Page border measure from edge of page. Always display in front option is set to on.

40Page border measure from edge of page. Always display in front option is set to off.

\pgbrdrsnapAlign paragraph borders and table edges with page border.
Line and Character Grid
\sectexpandNCharacter space basement (character pitch minus font size) N in device independent units (a device independent unit is 1/294912th of an inch).
\sectlinegridNLine grid, where N is the line pitch in 20ths of a point.
\sectdefaultclDefault state of section. Indicates \sectspecifycl and \sectspecifyl are not emitted.
\sectspecifyclSpecify number of characters per line only.
\sectspecifylSpecify both number of characters per line and number of lines per page.
\sectspecifygenNIndicates that text should snap to the character grid. Note that the N is part of the keyword.

The color, width, border style, and border spacing keywords for page borders are the same as the keywords defined for paragraph borders.

Headers and Footers

Headers and footers are RTF destinations. Each section in the document can have its own set of headers and footers. If no headers or footers are defined for a given section, the headers and footers from the previous section (if any) are used. Headers and footers have the following syntax:

<hdrftr> '{' <hdrctl> <para>+ '}' <hdrftr>?
<hdrctl> \header | \footer | \headerl | \headerr | \headerf | \footerl | \footerr | \footerf

Note

   

Each separate <hdrftr> group must have a distinct <hdrctl> introducing it.

Control
Word
Meaning
\header Header on all pages. This is a destination control word.
\footer Footer on all pages. This is a destination control word.
\headerl Header on left pages only. This is a destination control word.
\headerr Header on right pages only. This is a destination control word.
\headerf Header on first page only. This is a destination control word.
\footerl Footer on left pages only. This is a destination control word.
\footerr Footer on right pages only. This is a destination control word.
\footerf Footer on first page only. This is a destination control word.

The \headerl, \headerr, \footerl, and \footerr control words are used in conjunction with the \facingp control word, and the \headerf and \footerf control words are used in conjunction with the \titlepg control word. Many RTF readers will not function correctly if the appropriate document properties are not set. In particular, if \facingp is not set, then only \header and \footer should be used; if \facingp is set, then only \headerl, \headerr, \footerl, and \footerr should be used. Combining both \facingp and \titlepg is allowed. You should not use \header to set the headers for both pages when \facingp is set. You can use \headerf if \titlepg is not set, but no header will appear. For more information, see Document Formatting Properties and Section Formatting Properties in this RTF Specification.

If the previous section had a first page header or footer and had \titlepg set, and the current section does not, then the previous section's first page header or footer is disabled. However, it is not destroyed; if subsequent sections have \titlepg set, then the first page header or footer is restored.

Paragraph Text

There are two kinds of paragraphs: plain and table. A table is a collection of paragraphs, and a table row is a continuous sequence of paragraphs partitioned into cells. The \intbl paragraph-formatting control word identifies the paragraph as part of a table. For more information, see the Table Definitions section of this RTF Specification. This control is inherited between paragraphs that do not have paragraph properties reset with \pard.

<para> <textpar> | <row>
<textpar> <pn>? <brdrdef>? <parfmt>* <apoctl>* <tabdef>? <shading>? (\subdocument | <char>+) (\par <para>)?
<row> (<tbldef> <cell>+ <tbldef> \row) | (<tbldef> <cell>+ \row) | (<cell>+ <tbldef> \row)
<cell> (<nestrow>? <tbldef>?) & <textpar>+ \cell
<nestrow> <nestcell>+ '{\*'\nesttableprops <tbldef> \nestrow '}'
<nestcell> <textpar>+ \nestcell

Paragraph Formatting Properties

These control words (described as <parfmt> in the paragraph-text syntax description) specify generic paragraph formatting properties. These control words can appear anywhere in the body of the paragraph, not just at the beginning.

Note

   

If the \pard control word is not present, the current paragraph inherits all paragraph properties defined in the previous paragraph.

The paragraph-formatting control words are listed in the following table.

Control
Word
Meaning
\parNew paragraph.
\ pardResets to default paragraph properties.
\hyphparToggles automatic hyphenation for the paragraph. Append 1 or nothing to toggle property on; append 0 to turn it off.
\intblParagraph is part of a table.
\itapNParagraph nesting level, where 0 is the main document, 1 is a table cell, 2 is a nested table cell, 3 is a doubly nested table cell, and so forth. The default is 1.
\keepKeep paragraph intact.
\keepnKeep paragraph with the next paragraph.
\levelNN is the outline level of the paragraph.
\nolineNo line numbering.
\nowidctlparNo widow/orphan control. This is a paragraph-level property and is used to override the document-level \widowctrl.
\widctlparWidow/orphan control is used for the current paragraph. This is a paragraph property used to override the absence of the document-level \widowctrl
\outlinelevelNOutline level of paragraph. The N argument is a value from 0-8 representing the outline level of the paragraph. In the default case, no outline level is specified (same as body text).
\pagebbBreak page before the paragraph.
\sbysSide-by-side paragraphs.
\sNDesignates paragraph style. If a paragraph style is specified, style properties must be specified with the paragraph. N references an entry in the stylesheet.
Alignment
\qcCentered.
\qjJustified.
\qlLeft-aligned (the default).
\qrRight-aligned.
\qdDistributed.
Font Alignment
\faautoFont alignment the default setting for this is "Auto."
\fahangFont alignment —> Hanging.
\facenterFont alignment —> Center.
\faromanFont alignment —> Roman (default).
\favarFont alignment —> Upholding variable.
\fafixedFont alignment ? Upholding fixed.
Indentation
\fiNFirst-line indent (the default is 0).
\cufiNFirst-line indent in hundredths of a character unit; overrides \fiN although they should both be emitted with equivalent values.
\liNLeft indent (the default is 0).
\linNLeft indent for left-to-right paragraphs; right indent for right-to-left paragraphs (the default is 0). It defines space before the paragraph.
\culiNLeft indent (space before) in hundredths of a character unit. Behaves like \linN and overrides \liN and \linN although they should all be emitted with equivalent values.
\riNRight indent (the default is 0).
\rinNRight indent for left-to-right paragraphs; left indent for right-to-left paragraphs (the default is 0). It defines space after the paragraph.
\curiNRight indent (space after) in hundredths of a character unit. Behaves like \rinN and overrides \riN and \rinN although they should all be emitted with equivalent values.
\adjustrightAutomatically adjust right indent when document grid is defined.
Spacing
\sbNSpace before (the default is 0).
\saNSpace after (the default is 0).
\sbautoNAuto spacing before:

0Space before determined by \sb.

1Space before is Auto (ignores \sb).

The default is 0.

\saautoNAuto spacing after:

0Space after determined by \sa.

1Space after is Auto (ignores \sa).

The default is 0.

\lisbNSpace before in hundredths of a character unit. Overrides \sbN although they should both be emitted with equivalent values.
\lisaNSpace after in hundredths of a character unit. Overrides \saN although they should both be emitted with equivalent values.
\slNSpace between lines. If this control word is missing or if \sl0 is used, the line spacing is automatically determined by the tallest character in the line. If N is a positive value, this size is used only if it is taller than the tallest character (otherwise, the tallest character is used). If N is a negative value, the absolute value of N is used, even if it is shorter than the tallest character.
\slmultNLine spacing multiple. Indicates that the current line spacing is a multiple of "Single" line spacing. This control word can follow only the \sl control word and works in conjunction with it.

0"At Least" or "Exactly" line spacing.

1Multiple line spacing, relative to "Single."

\nosnaplinegridDisable snap line to grid.
Subdocuments
\subdocumentNThis indicates that a subdocument in a master document/subdocument relationship should occur here. N represents an index into the file table. This control word must be the only item in a paragraph.
Bidirectional Controls
\rtlparText in this paragraph will be displayed with right-to-left precedence.
\ltrparText in this paragraph will be displayed with left-to-right precedence (the default).
Asian Typography
\nocwrapNo character wrapping.
\nowwrapNo word wrapping.
\nooverflowNo overflow period and comma.
\aspalphaAuto spacing between DBC and English.
\aspnumAuto spacing between DBC and numbers.
Pocket Word
\collapsedParagraph property active in Outline view that specifies that the paragraph is collapsed (not viewed).

Tabs

Any paragraph may have its own set of tabs. Tabs must follow this syntax:

<tabdef> (<tab> | <bartab>)+
<tab> <tabkind>? <tablead>? \tx
<bartab> <tablead>? \tb
<tabkind> \tqr | \tqc | \tqdec
<tablead> \tldot | \tlmdot | \tlhyph | \tlul | \tlth | \tleq
Control
Word
Meaning
\txN Tab position in twips from the left margin.
\tqr Flush-right tab.
\tqc Centered tab.
\tqdec Decimal tab.
\tbN Bar tab position in twips from the left margin.
\tldot Leader dots.
\tlmdot Leader middle dots.
\tlhyph Leader hyphens.
\tlul Leader underline.
\tlth Leader thick line.
\tleq Leader equal sign.

Bullets and Numbering

Word 6.0/95 RTF

To provide compatibility with existing RTF readers, all applications that can automatically format paragraphs with bullets or numbers will also emit the generated text as plain text in the \pntext group. This will allow existing RTF readers to capture the plain text and safely ignore the autonumber instructions. This group precedes all bulleted or numbered paragraphs, and will contain all the text and formatting that would be auto-generated. It should precede the '{'\*\pn ... '}' destination, and it is the responsibility of RTF readers that understand the '{'\*\pn ... '}' destination to ignore the \pntext group.

<pn> <pnseclvl> | <pnpara>
<pnseclvl> '{\*' \pnseclvl <pndesc>'}'
<pnpara> <pntext> <pnprops>
<pntext> '{' \pntext <char> '}'
<pnprops> '{\*' \pn <pnlevel> <pndesc>'}'
<pnlevel> \pnlvl | \pnlvlblt | \pnlvlbody | \pnlvlcont
<pndesc> <pnnstyle> & <pnchrfmt> & <pntxtb> & <pntxta> & <pnfmt>
<pnnstyle> \pncard | \pndec | \pnucltr | \pnucrm | \pnlcltr | \pnlcrm | \pnord | \pnordt | \pnbidia | \pnbidib | \pnaiu | \pnaiud | \pnaiueo | \pnaiueod | \pnchosung | \pncnum | \pndbnum | \pndbnumd | \pndbnumk | \pndbnuml | \pndbnumt | \pndecd | \pnganada | \pnganada | \pngbnum | \pngbnumd | \pngbnumk | \pngbnuml | \pniroha | \pnirohad | \pnuldash | \pnuldashd | \pnuldashdd | \pnulhair | \pnulth | \pnulwave | \pnzodiac | \pnzodiacd | \pnzodiacl
<pnchrfmt> \pnf? & \pnfs? & \pnb? & \pni? & \pncaps? & \pnscaps? & <pnul>? & \pnstrike? & \pncf?
<pnul> \pnul | \pnuld | \pnuldb | \pnulnone | \pnulw
<pnfmt> \pnnumonce? & \pnacross? & \pnindent? & \pnsp? & \pnprev? & <pnjust>? & \pnstart? & \pnhang? & \pnrestart?
<pnjust> \pnqc | \pnql | \pnqr
<pntxtb> '{' \pntxtb #PCDATA'}'
<pntxta> '{' \pntxta #PCDATA'}'

Settings below marked with an asterisk can be turned off by appending 0 to the control word.

Control
Word
Definition
\pntext This group precedes all numbered/bulleted paragraphs, and contains all auto-generated text and formatting. It should precede the '{\*'\pn ... '}' destination, and it is the responsibility of RTF readers that understand the '{\*'\pn ... '}' destination to ignore this preceding group. This is a destination control word.
\pn Turns on paragraph numbering. This is a destination control word.
\pnlvlN Paragraph level, where N is a level from 1 to 9. Default set by \pnseclvlN section formatting property.
\pnlvlblt Bulleted paragraph (corresponds to level 11). The actual character used for the bullet is stored in the \pntxtb group.
\pnlvlbody Simple paragraph numbering (corresponds to level 10).
\pnlvlcont Continue numbering but do not display number ("skip numbering").
\pnnumonce Number each cell only once in a table (the default is to number each paragraph in a table).
\pnacross Number across rows (the default is to number down columns).
\pnhang Paragraph uses a hanging indent.
\pnrestart Restart numbering after each section break. Note that this control word is used only in conjunction with the Heading Numbering feature (applying multilevel numbering to Heading style definitions).
\pncard Cardinal numbering (One, Two, Three).
\pndec Decimal numbering (1, 2, 3).
\pnucltr Uppercase alphabetic numbering (A, B, C).
\pnucrm Uppercase roman numbering (I, II, III).
\pnlcltr Lowercase alphabetic numbering (a, b, c).
\pnlcrm Lowercase roman numbering. (i, ii, iii).
\pnord Ordinal numbering (1st, 2nd, 3rd).
\pnordt Ordinal text numbering (First, Second, Third).
\pnbidia Abjad Jawaz if language is Arabic and Biblical Standard if language is Hebrew.
\pnbidib Alif Ba Tah if language is Arabic and Non-standard Decimal if language is Hebrew.
\pnaiu 46 phonetic katakana characters in "aiueo" order (\*aiueo).
\pnaiud 46 phonetic double-byte katakana characters (\*aiueo\*dbchar).
\pnaiueo 46 phonetic Katakana characters in "aiueo" order (*aiueo).
\pnaiueod 46 phonetic double-byte Katakana characters (*aiueo*dbchar).
\pnchosung Korean numbering 2 (*chosung).
\pncnum 20 numbered list in circle (\*circlenum).
\pndbnum Kanji numbering without the digit character (\*dbnum1).
\pndbnumd Kanji numbering with the digit character (*dbnum2).
\pndbnumk Kanji numbering 4 (*dbnum4).
\pndbnuml Kanji numbering 3 (*dbnum3).
\pndbnumt Kanji numbering 3 (*dbnum3).
\pndecd Double-byte decimal numbering (\*arabic\*dbchar).
\pnganada Korean numbering 2 (*ganada).
\pnganada Korean numbering 1 (*ganada).
\pngbnum Chinese numbering 1 (*gb1).
\pngbnumd Chinese numbering 2 (*gb2).
\pngbnumk Chinese numbering 4 (*gb4).
\pngbnuml Chinese numbering 3 (*gb3).
\pniroha 46 phonetic katakana characters in "iroha" order (\*iroha).
\pnirohad 46 phonetic double-byte katakana characters (\*iroha\*dbchar).
\pnuldash Dashed underline.
\pnuldashd Dash-dotted underline.
\pnuldashdd Dash-dot-dotted underline.
\pnulhair Hairline underline.
\pnulth Thick underline.
\pnulwave Wave underline.
\pnzodiac Chinese Zodiac numbering 1 (*zodiac1).
\pnzodiacd Chinese Zodiac numbering 2 (*zodiac2).
\pnzodiacl Chinese Zodiac numbering 3 (*zodiac3).
\pnb Bold numbering.*
\pni Italic numbering.*
\pncaps All Caps numbering.*
\pnscaps Small Caps numbering.*
\pnul Continuous underline.*
\pnuld Dotted underline.
\pnuldb Double underline.
\pnulnone Turns off underlining.
\pnulw Word underline.
\pnstrike Strikethrough numbering.*
\pncfN Foreground color—index into color table (the default is 0).
\pnfN Font number.
\pnfsN Font size (in half-points).
\pnindentN Minimum distance from margin to body text.
\pnspN Distance from number text to body text.
\pnprev Used for multilevel lists. Include information from previous level in this level; for example, 1, 1.1, 1.1.1, 1.1.1.1
\pnqc Centered numbering.
\pnql Left-justified numbering.
\pnqr Right-justified numbering.
\pnstartN Start at number.
\pntxta Text after. This group contains the text that succeeds the number. This is a destination control word.
\pntxtb Text before. This group contains the text that precedes the number. This is a destination control word.

Note

   

The limit is 32 characters total for the sum of text before and text after for simple numbering. Multilevel numbering has a limit of 64 characters total for the sum of all levels.

Word 97-2000 RTF

Each paragraph that is part of a list must contain some keyword to indicate which list it is in, and which level of the list it belongs to. Word 97-2000 also provides the flat-text representation of each number (in the \listtext destination); so, RTF readers that don't understand Word 97 numbering will get the paragraph number, together with appropriate character properties, inserted into their document at the beginning of the paragraph. Any RTF reader that does understand Word 97-2000 numbering should ignore the entire \listtext destination.

Control
Word
Meaning
\ls Should exactly match the ls for one of the list overrides in the List Override table.
\ilvl The 0-based level of the list to which the paragraph belongs. For all simple lists, this should always be 0 . For multilevel lists, it can be 0-8.
\listtext Contains the flat-text representation of the number, including character properties. Should be ignored by any reader that understands Word 97-2000 numbering. This is a destination control word.

Revision Marks for Paragraph Numbers

Paragraph numbers and ListNum fields track revision information with special properties applied to the paragraph mark and ListNum field, respectively. The special properties hold the "old" value of the number—the value it held when revision-mark tracking began. At display time, Word checks the number's current value and compares it with this "old" value to tell if it has changed. If the numbers are different, the old value shows up as deleted and the new value as inserted; if the numbers are the same, Word displays the new value normally, with no revision information. If there was no old value, the new value shows up as inserted. The following table lists the RTF specifications for these special properties.

Track Changes (Revision Mark) Properties for Paragraph Numbers
\pnrauthNIndex into the revision table. The content of the Nth group in the revision table is considered to be the author of that revision.
Note
   
This keyword is used to indicate paragraph number revisions.
\pnrdateNTime of the revision. The 32-bit DTTM structure is emitted as a long integer.
\pnrnotIndicates if the paragraph number for the current paragraph is marked as "inserted."
\pnrxstNThe keywords \pnrxst, \pnrrgb, \pnrpnbr, and \pnrnfc describe the "deleted number" text for the paragraph number. Their values are binary. Each of these keywords is represented as an array. The deleted number is written out with a \pnrstart keyword, followed by the array's keyword, followed by the first byte of the array, followed by the array's keyword, followed by the second byte of the array's keyword, followed by the array's keyword, followed by the third byte of the array's keyword, and so on. This sequence is followed by the \pnrstop keyword.

\pnrxst is a 32-item Unicode character array (double bytes for each character) with a length byte as the first number—it has the actual text of the number, with "level" place holders written out as digits from 0-8.

\pnrrgbN Nine-item array of indices of the level place holders in the \pnrxst array.
\pnrnfcN Nine-item array containing the number format codes of each level (using the same values as the \levelnfc keyword). The number format code is represented as a short integer.
\pnrpnbrN Nine-item array of the actual values of the number in each level. The number is represented as a long integer
\pnrstartN The \pnrxst, \pnrrgb, \pnrpnbr, and \pnrnfc arrays are each preceded by the \pnrstart keyword, whose argument is 0-3 depending on the array.
\pnrstopN The \pnrxst, \pnrrgb, \pnrpnbr, and \pnrnfc arrays are each terminated by the \pnrstop keyword, whose argument is the number of bytes written out in the array.

Example:

Take an example of the number "3-4b," which represents the third level of the list. The following table lists the values of each array.

Array Binary Comment
pnrxst \'05\'00-\'01\'02 The length of the string is 5. Then, first level (level 0), followed by a dash, followed by the second and third levels (levels 1 and 2), followed by a period.
pnrrgb \'01\'03\'04 The level placeholders are at indices 1, 3, and 4 in the string.
pnrnfc \'00\'00\'04 The nfc values are Arabic (0), Arabic (0), and lowercase letter (4).
pnrpnbr \'03\'04\'02 The numbers or 3, 4, and 2 (b)

Here is the RTF for this number:

\pnrstart0
\pnrxst0\pnrxst5\pnrxst0\pnrxst1\pnrxst0\pnrxst45
\pnrxst0\pnrxst2\pnrxst0\pnrxst3\pnrxst0\pnrxst46
\pnrstop12

\pnrstart1
\pnrrgb1\pnrrgb3\pnrrgb4
\pnrrgb0\pnrrgb0\pnrrgb0
\pnrrgb0\pnrrgb0\pnrrgb0
\pnrstop9

\pnrstart2
\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc4
\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0
\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0\pnrnfc0
\pnrstop18

\pnrstart3
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr3
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr4
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr2
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0 
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrpnbr0\pnrpnbr0\pnrpnbr0\pnrpnbr0
\pnrstop36
Control
Word
Meaning
Track Changes (Revision Mark) Properties for ListNum Fields
\dfrauthNIndex into the revision table. The content of the Nth group in the revision table is considered the author of that revision.
Note
   
This keyword is used to indicate the deleted value of a ListNum field.
\dfrdateNTime of the revision. The 32-bit DTTM structure is emitted as a long integer.
\dfrxstUnicode character array with a length byte.
\dfrstartThe \dfrxst array is preceded by the \dfrstart keyword.
\dfrstopThe \dfrxst array is terminated by the \dfrstop keyword.

Example:

Take the sample example from above. The deleted value is "3-4b." The RTF would then be

\dfrstart0\dfrxst0\dfrxst5\dfrxst0\dfrxst51\dfrxst0\dfrxst45\dfrxst0\dfrxst52
\dfrxst0\dfrxst66\dfrxst0\dfrxst46\dfrstop10

where 5 is the length byte, 51 is Unicode for "3", 45 is Unicode for "-", 52 is Unicode for "4", and so on.

Paragraph Borders

Paragraph borders have the following syntax:

<brdrdef> (<brdrseg> <brdr> )+
<brdrseg> \brdrt | \brdrb | \brdrl | \brdrr | \brdrbtw | \brdrbar | \box
<brdr> <brdrk> \brdrw? \brsp? \brdrcf?
<brdrk> \brdrs | \brdrth | \brdrsh | \brdrdb | \brdrdot | \brdrdash | \brdrhair | brdrinset | \brdrdashsm | \brdrdashd | \brdrdashdd | \brdrtriple | \brdrtnthsg | \brdrthtnsg | \brdrtnthtnsg | \brdrtnthmg | \brdrthtnmg | \brdrtnthtnmg | \brdrtnthlg | \brdrthtnlg | \brdrtnthtnlg | \brdrwavy | \brdrwavydb | \brdrdashdotstr | \brdremboss | \brdrengrave \brdroutset | \ brdrnone
Control
Word
Meaning
\brdrt Border top.
\brdrb Border bottom.
\brdrl Border left.
\brdrr Border right.
\brdrbtw Consecutive paragraphs with identical border formatting are considered part of a single group with the border information applying to the entire group. To have borders around individual paragraphs within the group, the \brdrbtw control must be specified for that paragraph.
\brdrbar Border outside (right side of odd-numbered pages, left side of even-numbered pages).
\box Border around the paragraph (box paragraph).
\brdrs Single-thickness border.
\brdrth Double-thickness border.
\brdrsh Shadowed border.
\brdrdb Double border.
\brdrdot Dotted border.
\brdrdash Dashed border.
\brdrhair Hairline border.
\brdrinset Inset border.
\brdrdashsm Dash border (small).
\brdrdashd Dot dash border.
\brdrdashdd Dot dot dash border.
\brdroutset Outset border.
\brdrtriple Triple border.
\brdrtnthsg Thick thin border (small).
\brdrthtnsg Thin thick border (small).
\brdrtnthtnsg Thin thick thin border (small).
\brdrtnthmg Thick thin border (medium).
\brdrthtnmg Thin thick border (medium).
\brdrtnthtnmg Thin thick thin border (medium).
\brdrtnthlg Thick thin border (large).
\brdrthtnlg Thin thick border (large).
\brdrtnthtnlg Thin thick thin border (large).
\brdrwavy Wavy border.
\brdrwavydb Double wavy border.
\brdrdashdotstr Striped border.
\brdremboss Emboss border.
\brdrengrave Engrave border.
\brdrframe Border resembles a "Frame."
\brdrwN N is the width in twips of the pen used to draw the paragraph border line. N cannot be greater than 75. To obtain a larger border width, the \brdth control word can be used to obtain a width double that of N.
\brdrcfN N is the color of the paragraph border, specified as an index into the color table in the RTF header.
\brspN Space in twips between borders and the paragraph.

Paragraph Shading

Paragraph shading has the following syntax:

<shading> (\shading | <pat>) \cfpat? \cbpat?
<pat> \bghoriz | \bgvert | \bgfdiag | \bgbdiag | \bgcross | \bgdcross | \bgdkhoriz | \bgdkvert | \bgdkfdiag | \bgdkbdiag | \bgdkcross | \bgdkdcross
Control
Word
Meaning
\shadingN N is the shading of the paragraph in hundredths of a percent.
\bghoriz Specifies a horizontal background pattern for the paragraph.
\bgvert Specifies a vertical background pattern for the paragraph.
\bgfdiag Specifies a forward diagonal background pattern for the paragraph (\\\\).
\bgbdiag Specifies a backward diagonal background pattern for the paragraph (////).
\bgcross Specifies a cross background pattern for the paragraph.
\bgdcross Specifies a diagonal cross background pattern for the paragraph.
\bgdkhoriz Specifies a dark horizontal background pattern for the paragraph.
\bgdkvert Specifies a dark vertical background pattern for the paragraph.
\bgdkfdiag Specifies a dark forward diagonal background pattern for the paragraph (\\\\).
\bgdkbdiag Specifies a dark backward diagonal background pattern for the paragraph (////).
\bgdkcross Specifies a dark cross background pattern for the paragraph.
\bgdkdcross Specifies a dark diagonal cross background pattern for the paragraph.
\cfpatN N is the fill color, specified as an index into the document's color table.
\cbpatN N is the background color of the background pattern, specified as an index into the document's color table.

Positioned Objects and Frames

The following paragraph-formatting control words specify the location of a paragraph on the page. Consecutive paragraphs with the same frame formatting are considered part of the same frame. For two framed paragraphs to appear at the same position on a page, they must be separated by a paragraph with different or no frame information.

Note that if any paragraph in a table row has any of these control words specified, then all paragraphs in the table row must have the same control words specified, either by inheriting the properties from the previous paragraph or by re-specifying the controls.

Paragraph positioning has the following syntax:

<apoctl> <framesize> & <horzpos> & <vertpos> & <txtwrap> & <dropcap> & <txtflow> & \absnoovrlp?
<framesize> \absw? & \absh?
<horzpos> <hframe> & <hdist>
<vertpos> <vframe> & <vdist>
<txtwrap> \nowrap? & \dxfrtext? & \dfrmtxtx? &\dfrmtxty?
<dropcap> \dropcapli? & \dropcapt?
<hframe> \phmrg? | \phpg? | \phcol?
<hdist> \posx? | \posnegx? | \posxc? | \posxi? | \posxo? | \posxl? | \posxr?
<vframe> \pvmrg? | \pvpg? | \pvpara?
<vdist> \posy? | \posnegy? | \posyt? | \posyil? | \posyb? | \posyc? | \posyin? | \posyout? & \abslock?
<txtflow> \frmtxlrtb | \frmtxtbrl | \frmtxbtlr | \frmtxlrtbv | \frmtxtbrlv
Control
Word
Meaning
Frame Size
\abswNN is the width of the frame in twips.
\abshNN is the height of the frame in twips. A positive number indicates the minimum height of the frame and a negative number indicates the exact height of the frame. A value of zero indicates that the height of the frame adjusts to the contents of the frame. This is the default for frames where no height is given.
Horizontal Position
\phmrgUse the margin as the horizontal reference frame.
\phpgUse the page as the horizontal reference frame.
\phcolUse the column as the horizontal reference frame. This is the default if no horizontal reference frame is given.
\posxNPositions the frame N twips from the left edge of the reference frame.
\posnegxN Same as \posx but allows arbitrary negative values.
\posxcCenters the frame horizontally within the reference frame.
\posxiPositions the paragraph horizontally inside the reference frame.
\posxoPositions the paragraph horizontally outside the reference frame.
\posxrPositions the paragraph to the right within the reference frame.
\posxlPositions the paragraph to the left within the reference frame. This is the default if no horizontal positioning information is given.
Vertical Position
\pvmrgPositions the reference frame vertically relative to the margin. This is the default if no vertical frame positioning information is given.
\pvpgPositions the reference frame vertically relative to the page.
\pvparaPositions the reference frame vertically relative to the top left corner of the next unframed paragraph in the RTF stream.
\posyNPositions the paragraph N twips from the top edge of the reference frame.
\posnegyNSame as \posy but allows arbitrary negative values.
\posyilPositions the paragraph vertically to be in-line.
\posytPositions the paragraph at the top of the reference frame.
\posycCenters the paragraph vertically within the reference frame.
\posybPositions the paragraph at the bottom of the reference frame.
\posyinPositions the paragraph vertically inside the reference frame.
\posyoutPositions the paragraph vertically outside the reference frame.
\abslockNLock anchor:

0Do not lock anchor (default).

1Locks a frame anchor to the current paragraph that it is associated with.

Text Wrapping
\nowrapPrevents text from flowing around the positioned object.
\dxfrtextNDistance in twips of a positioned paragraph from text in the main text flow in all directions.
\dfrmtxtxNN is the horizontal distance in twips from text on both sides of the frame.
\dfrmtxtyNN is the vertical distance in twips from text on both sides of the frame.
\overlayText flows underneath frame.
Drop Caps
\dropcapliN Number of lines drop cap is to occupy. The range is 1 through 10.
\dropcaptN Type of drop cap:

1In-text drop cap

2Margin drop cap

Overlap
\absnoovrlpNAllow overlap with other frames or objects with similar wrapping:

0Allow overlap (default)

1Do not allow overlap.

Text Flow
\frmtxlrtbFrame box flows from left to right and top to bottom (default).
\frmtxtbrlFrame box flows right to left and top to bottom.
\frmtxbtlrFrame box flows left to right and bottom to top.
\frmtxlrtbvFrame box flows left to right and top to bottom, vertical.
\frmtxtbrlvFrame box flows top to bottom and right to left, vertical.

The following is an example of absolute-positioned text in a document:

\par \pard \pvpg\phpg\posxc\posyt\absw5040\dxfrtest173 First APO para
\par \pard \phmrg\posxo\posyc\dxfrtext1152 Second APO para

Table Definitions

There is no RTF table group; instead, tables are specified as paragraph properties. A table is represented as a sequence of table rows. A table row is a continuous sequence of paragraphs partitioned into cells. The table row begins with the \trowd control word and ends with the \row control word. Every paragraph that is contained in a table row must have the \intbl control word specified or inherited from the previous paragraph. A cell may have more than one paragraph in it; the cell is terminated by a cell mark (the \cell control word), and the row is terminated by a row mark (the \row control word). Table rows can also be positioned. In this case, every paragraph in a table row must have the same positioning controls (see the <apoctl> controls in the Positioned Objects and Frames sub-section of this RTF Specification). Table properties may be inherited from the previous row; therefore, a series of table rows may be introduced by a single <tbldef>.

An RTF table row has the following syntax, as shown in the general paragraph-text syntax shown in the Paragraph Text section of this RTF Specification.

<row> (<tbldef> <cell>+ <tbldef> \row) | (<tbldef> <cell>+ \row) | (<cell>+ <tbldef> \row)
<cell> (<nestrow>? <tbldef>?) & <textpar>+ \cell
<nestrow> <nestcell>+ '{\*'\nesttableprops <tbldef> \nestrow '}'
<nestcell> <textpar>+ \nestcell

Note that while Word 97 emitted the row properties (<tbldef>) at the beginning of the row, a reader should not assume that this is the case. Properties can be emitted at the end and in fact Word 2000 does this. To avoid breaking readers that might make the aforementioned assumption Word 2000 will write a copy at the beginning as well, so the properties of a typical row in a Word 2000 document are repeated at the beginning and at the end of the row. Note that for nested cells Word 2000 only writes the properties at the end.

A table definition has the following syntax:

<tbldef> \trowd \trgaph & <rowjust>? & <rowwrite>? & <rowtop>? & <rowbot>? & <rowleft>? & <rowright>? & <rowhor>? & <rowvert>? & <rowpos> ? & \trleft? & \trrh? \trhdr? & \trkeep? & <rowwidth>? & <rowinv>? & \trautofit? & <rowspc>? & <rowpad>? & \taprtl?<celldef>+
<rowjust> \trql | \trqr | \trqc
<rowwrite> \ltrrow | \rtlrow
<rowtop> \trbrdrt <brdr>
<rowbot> \trbrdrl <brdr>
<rowleft> \trbrdrb <brdr>
<rowright> \trbrdrr <brdr>
<rowhor> \trbrdrh <brdr>
<rowvert> \trbrdrv <brdr>
<rowpos> <rowhorzpos> & <rowvertpos> & <rowwrap> & \tabsnoovrlp?
<rowhorzpos> <rowhframe>& <rowhdist>
<rowvertpos> <rowvframe>& <rowvdist>
<rowwrap> \tdfrmtxtLeft? & \tdfrmtxtRight? & \tdfrmtxtTop? & \tdfrmtxtBottom?
<rowhframe> \phmrg? | \phpg? | \phcol?
<rowhdist> \tposx? | \tposnegx? | \tposxc? | \tposxi? | \tposxo? | \tposxl? | \tposxr?
<rowvframe> \tpvmrg? | \tpvpg? | \tpvpara?
<rowvdist> \tposy? | \tposnegy? | \tposyt? | \tposyil? | \tposyb? | \tposyc? | tposyin | tposyout
<rowwidth> \trftsWidth & \trwWidth?
<rowinv> (\trftsWidthB & \trwWidthB?)? & (\trftsWidthA & \trwWidthA?)?
<rowspc> (\trspdl & \trspdfl?)? & (\trspdt & \trspdft?)? & (\trspdb & \trspdfb?)? & (\trspdr & \trspdfr?)?
<rowpad> (\trpaddl & \trpaddfl?)? & (\trpaddt & \trpaddft?)? & (\trpaddb & \trpaddfb?)? & (\trpaddr & \trpaddfr?)?
<celldef> (\clmgf? & \clmrg? & \clvmgf? & \clvmrg? <celldgu>? & <celldgl>? & <cellalign>? & <celltop>? & <cellleft>? & <cellbot>? & <cellright>? & <cellshad>? & <cellflow>? & clFitText? & clNoWrap? & <cellwidth>? & <cellpad>?) \cellx
<celldgu> \cldglu <brdr>
<celldgl> \cldgll <brdr>
<cellalign> \clvertalt | \clvertalc | \clvertalb
<celltop> \clbrdrt <brdr>
<cellleft> \clbrdrl <brdr>
<cellbot> \clbrdrb <brdr>
<cellright> \clbrdrr <brdr>
<cellshad> <cellpat>? \clcfpat? & \clcbpat? & \clshdng
<cellpat> \clbghoriz | \clbgvert | \clbgfdiag | \clbgbdiag | \clbgcross | \clbgdcross | \clbgdkhor | \clbgdkvert | \clbgdkfdiag | \clbgdkbdiag | \clbgdkcross | \clbgdkdcross
<cellflow> \cltxlrtb | \cltxtbrl | \cltxbtlr | \cltxlrtbv | \cltxtbrlv
<cellwidth> \clftsWidth & \clwWidth?
<cellpad> (\clpadl & \clpadfl?)? & (\clpadt & \clpadft?)? & (\clpadb & \clpadfb?)? & (\clpadr & \clpadfr?)?

Note

   

For <tbldef>, the number of \cellxs must match the number of \cells in the \row.

The following control words further define options for each row of the table.

Control
Word
Meaning
\trowdSets table row defaults.
\rowDenotes the end of a row.
\tcelldSets table cell defaults.
\nestcellDenotes the end of a nested cell.
\nestrowDenotes the end of a nested row.
\nesttablepropsDefines the properties of a nested table. This is a destination control word.
\nonesttablesContains text for readers that do not understand nested tables. This destination should be ignored by readers that support nested tables.
\trgaphNHalf the space between the cells of a table row in twips.
\cellxNDefines the right boundary of a table cell, including its half of the space between cells.
\cellDenotes the end of a table cell.
\clmgfThe first cell in a range of table cells to be merged.
\clmrgContents of the table cell are merged with those of the preceding cell.
\clvmgfThe first cell in a range of table cells to be vertically merged.
\clvmrgContents of the table cell are vertically merged with those of the preceding cell.
Row Formatting
\taprtlTable direction is right to left.
\trautofitNAutoFit:

0No AutoFit (default)

1AutoFit is on for the row. Overridden by \clwWidthN and \trwWidthN in any table row.

\trhdrTable row header. This row should appear at the top of every page the current table appears on.
\trkeepTable row keep together. This row cannot be split by a page break. This property is assumed to be off unless the control word is present.
\trkeepfollowKeep row in the same page as the following row.
\trleftNPosition in twips of the leftmost edge of the table with respect to the left edge of its column.
\trqcCenters a table row with respect to its containing column.
\trqlLeft-justifies a table row with respect to its containing column.
\trqrRight-justifies a table row with respect to its containing column.
\trrhNHeight of a table row in twips. When 0, the height is sufficient for all the text in the line; when positive, the height is guaranteed to be at least the specified height; when negative, the absolute value of the height is used, regardless of the height of the text in the line.
\trpaddbNDefault bottom cell margin or padding for the row.
\trpaddlNDefault left cell margin or padding for the row.
\trpaddrNDefault right cell margin or padding for the row.
\trpaddtNDefault top cell margin or padding for the row.
\trpaddfbNUnits for \ trpaddbN:

0Null.  Ignore \ trpaddbN in favor of \trgaph (Word 97 style padding).

3Twips

\trpaddflNUnits for \ trpaddlN:

0Null.  Ignore \ trpaddlN in favor of \trgaph (Word 97 style padding).

3Twips

\trpaddfrNUnits for \ trpaddrN:

0Null.  Ignore \ trpaddrN in favor of \trgaph (Word 97 style padding).

3Twips

\trpaddftNUnits for \ trpaddtN:

0Null.  Ignore \ trpaddtN in favor of \trgaph (Word 97 style padding).

3Twips

\trspdlNDefault left cell spacing for the row. The total horizontal spacing between adjacent cells is equal to the sum of \trspdlN from the rightmost cell and \trspdrN, from the leftmost cell both of which will have the same value when written by Word.
\trspdtNDefault top cell spacing for the row. The total horizontal spacing between adjacent cells is equal to the sum of \trspdtN from the bottom cell and \trspdbN, from the top cell both of which will have the same value when written by Word.
\trspdbNDefault bottom cell spacing for the row. The total horizontal spacing between adjacent cells is equal to the sum of \trspdtN from the bottom cell and \trspdbN, from the top cell both of which will have the same value when written by Word.
\trspdrNDefault right cell spacing for the row. The total horizontal spacing between adjacent cells is equal to the sum of \trspdlN from the rightmost cell and \trspdrN, from the leftmost cell both of which will have the same value when written by Word.
\trspdflNUnits for \trspdlN:

0Null.  Ignore \trspdlN.

3Twips

\trspdftNUnits for \trspdtN:

0Null.  Ignore \trspdtN.

3Twips

\trspdfbNUnits for \trspdbN:

0Null.  Ignore \trspdbN.

3Twips

\trspdfrNUnits for \trspdrN:

0Null.  Ignore \trspdrN.

3Twips

\trwWidthNPreferred row width. Overrides \trautofitN.
\trftsWidthNUnits for \clwWidthN:

0Null.  Ignore \trwWidth in favor of \cellx (Word 97 style of determining cell and row width)

1Auto. No preferred row width, ignores \clwWidthN if present; \clwWidthN will generally not be written, giving precedence to row defaults and autofit.

2Percentage (in 50ths of a percent)

3Twips

\trwWidthBNWidth of invisible cell at the beginning of the row. Used only in cases where rows have different widths.
\trftsWidthBNUnits for \clwWidthBN:

0Null.  No invisible cell before.

1Auto, ignores \clwWidthBN if present; \clwWidthBN will generally not be written.

2Percentage (in 50ths of a percent)

3Twips

\trwWidthANWidth of invisible cell at the end of the row. Used only in cases where rows have different widths.
\trftsWidthANUnits for \clwWidthBN:

0Null. No invisible cell after.

1Auto, ignores \clwWidthBN if present; \clwWidthBN will generally not be written.

2Percentage (in 50ths of a percent)

3Twips

Cell Formatting
\clFitTextFit text in cell, compressing each paragraph to the width of the cell.
\clNoWrapDo not wrap text for the cell. Only has an effect if the table cell does not have a preferred \clwWidthN, which overrides \trautofitN.
\clpadlNLeft cell margin or padding. Overrides \trpaddlN.
\clpadtNTop cell margin or padding. Overrides \trpaddtN.
\clpadbNBottom cell margin or padding. Overrides \trpaddbN.
\clpadrNRight cell margin or padding. Overrides \trpaddrN.
\clpadflNUnits for \clpadlN:

0Null.  Ignore \clpadl in favor of \trgaph (Word 97 style cell padding).

3Twips

\clpadftNUnits for \clpadtN:

0Null.  Ignore \clpadt in favor of \trgaph (Word 97 style cell padding).

3Twips

\clpadfbNUnits for \clpadbN:

0Null.  Ignore \clpadb in favor of \trgaph (Word 97 style cell padding).

3Twips

\clpadfrNUnits for \clpadrN:

0Null.  Ignore \clpadr in favor of \trgaph (Word 97 style cell padding).

3Twips

\clwWidthNPreferred cell width. Overrides \trautofitN.
\clftsWidthNUnits for \clwWidthN:

0Null.  Ignore \clwWidth in favor of \cellx (Word 97 style of determining cell and row width)

1Auto, no preferred cell width, ignores \clwWidthN if present; \clwWidthN will generally not be written, giving precedence to row defaults.

2Percentage (in 50ths of a percent)

3Twips

Positioned wrapped tables: the following properties must be the same for all rows in the table
\tdfrmtxtLeftNDistance in twips, between the left of the table and surrounding text (the default is 0).
\tdfrmtxtRightNDistance in twips, between the right of the table and surrounding text (the default is 0).
\tdfrmtxtTopNDistance in twips, between the top of the table and surrounding text (the default is 0).
\tdfrmtxtBottomNDistance in twips, between the bottom of the table and surrounding text (the default is 0).
\tabsnoovrlpDo not allow the table to overlap with other tables or shapes with similar wrapping not contained within it.
\tphcolUse the column as the horizontal reference frame. This is the default if no horizontal table positioning information is given.
\tphmrgUse the margin as the horizontal reference frame.
\tphpgUse the page as the horizontal reference frame.
\tposnegxNSame as \tposx but allows arbitrary negative values.
\tposnegyNSame as \tposy but allows arbitrary negative values.
\tposxNPositions the table N twips from the left edge of the horizontal reference frame.
\tposxcCenters the table within the horizontal reference frame.
\tposxiPositions the table inside the horizontal reference frame.
\tposxlPositions the table at the left of the horizontal reference frame.
\tposxoPositions the table outside the horizontal reference frame.
\tposxrPositions the table at the right of the horizontal reference frame.
\tposyPositions the table N twips from the top edge of the vertical reference frame.
\tposybPositions the table at the bottom of the vertical reference frame.
\tposycCenters the table within the vertical reference frame
\tposyilPositions the table to be in-line.
\tposyinPositions the table inside within the vertical reference frame.
\tposyoutPositions the table outside within the vertical reference frame.
\tposytPositions the table at the top of the vertical reference frame.
\tpvmrgPositions the table vertically relative to the top margin. This is the default if no vertical table positioning information is given.
\tpvparaPositions the table vertically relative to the top left corner of the next unframed paragraph in the stream.
\tpvpgPositions the table vertically relative to the top of the page.
Bidirectional Controls
\rtlrowCells in this table row will have right-to-left precedence.
\ltrrowCells in this table row will have left-to-right precedence (the default).
Row Borders
\trbrdrtTable row border top.
\trbrdrlTable row border left.
\trbrdrbTable row border bottom.
\trbrdrrTable row border right.
\trbrdrhTable row border horizontal (inside).
\trbrdrvTable row border vertical (inside).
Cell Borders
\clbrdrbBottom table cell border.
\clbrdrtTop table cell border.
\clbrdrlLeft table cell border.
\clbrdrrRight table cell border.
\cldgluDiagonal line (top left to bottom right).
\cldgllDiagonal line (top right to bottom left).
Cell Shading and Background Pattern
\clshdngNN is the shading of a table cell in hundredths of a percent. This control should be included in RTF together with cell border information.
\clbghorizSpecifies a horizontal background pattern for the cell.
\clbgvertSpecifies a vertical background pattern for the cell.
\clbgfdiagSpecifies a forward diagonal background pattern for the cell (\\\\).
\clbgbdiagSpecifies a backward diagonal background pattern for the cell (////).
\clbgcrossSpecifies a cross background pattern for the cell.
\clbgdcrossSpecifies a diagonal cross background pattern for the cell.
\clbgdkhorSpecifies a dark horizontal background pattern for the cell.
\clbgdkvertSpecifies a dark vertical background pattern for the cell.
\clbgdkfdiagSpecifies a dark forward diagonal background pattern for the cell (\\\\).
\clbgdkbdiagSpecifies a dark backward diagonal background pattern for the cell (////).
\clbgdkcrossSpecifies a dark cross background pattern for the cell.
\clbgdkdcrossSpecifies a dark diagonal cross background pattern for the cell.
\clcfpatNN is the line color of the background pattern.
\clcbpatNN is the background color of the background pattern.
Cell Vertical Text Alignment
\clvertaltText is top-aligned in cell (the default).
\clvertalcText is centered vertically in cell.
\clvertalbText is bottom-aligned in cell.
Cell Text Flow
\cltxlrtbText in a cell flows from left to right and top to bottom (default).
\cltxtbrlText in a cell flows right to left and top to bottom.
\cltxbtlrText in a cell flows left to right and bottom to top.
\cltxlrtbvText in a cell flows left to right and top to bottom, vertical.
\cltxtbrlvText in a cell flows top to bottom and right to left, vertical.

The following is a thorough example of Word 2000 table RTF:

This is an example of what a complex table looks in RTF. The BMP showing the table's look and position is followed by the corresponding RTF, followed by a piece-by-piece analysis of the RTF.

The illustration in Figure 1 shows a freely positioned Word table, with two cells at an offset. Inside the topmost cell there is a nested table. The table has green borders, yellow shading, a small amount of spacing between cells, and also inner cell margins or padding.

Figure 1. Freely positioned Word table, nested with two cells at offset

**Table RTF—**This is the RTF for this table as emitted by Word 2000. Word 2000 also emits RTF that older readers (such as previous versions of Word) can understand, so new features degrade nicely.

\trowd \trgaph115\trleft388\trbrdrt\brdrs\brdrw15\brdrcf11 \trbrdrl
\brdrs\brdrw15\brdrcf11 \trbrdrb\brdrs\brdrw15\brdrcf11 \trbrdrr
\brdrs\brdrw15\brdrcf11 \trbrdrh\brdrs\brdrw15\brdrcf11 \trbrdrv
\brdrs\brdrw15\brdrcf11 \tphmrg\tposxc\tposyc\tdfrmtxtLeft187
\tdfrmtxtRight187\trftsWidth1\trftsWidthB3\trwWidthB504\trftsWidthA3
\trautofit1\trspdl14\trspdt14\trspdb14\trspdr14\trspdfl3\trspdft3\trspdfb3
\trspdfr3\trpaddl115\trpaddr115\trpaddfl3\trpaddfr3 \clvertalc\clbrdrt
\brdrs\brdrw15\brdrcf11 \clbrdrl\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \clcbpat17
\cltxlrtb\clftsWidth3\clwWidth4644 \cellx5074\pard\plain 

\qc \li0\ri0\widctlpar\intbl\phmrg\posxc\posyc\dxfrtext187\dfrmtxtx187
\dfrmtxty0\aspalpha\aspnum\faauto\adjustright\rin0\lin0 \fs24
\lang1033\langfe2052\loch\af0\hich\af0\dbch\af17\cgrid
\langnp1033\langfenp2052 {\hich\af0\dbch\af17\loch\f0 CELL ONE

\par }\pard \qc \li0\ri0\widctlpar\intbl\phmrg\posxc\posyc\dxfrtext187\dfrmtxtx187
\dfrmtxty0\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap2 
{\hich\af0\dbch\af17\loch\f0 NESTED TABLE\nestcell{\nonesttables

\par }}\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto
\adjustright\rin0\lin0\itap2 {{\*\nesttableprops\trowd 
\trgaph108\trleft8\trbrdrt
\brdrs\brdrw15\brdrcf11 \trbrdrl\brdrs\brdrw15\brdrcf11 \trbrdrb\brdrs\brdrw15\brdrcf11 \trbrdrr

\brdrs\brdrw15\brdrcf11 \trbrdrh
\brdrs\brdrw15\brdrcf11 \trbrdrv
\brdrs\brdrw15\brdrcf11 \trftsWidth1\trautofit1\trpaddl108
\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
\brdrs\brdrw15\brdrcf11 \clbrdrl\brdrs\brdrw15\brdrcf11 \clbrdrb

\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \cltxlrtb\clftsWidth3\clwWidth2340 \cellx2348\nestrow}
{\nonesttables

\par }}\trowd \trgaph115\trleft388\trbrdrt
\brdrs\brdrw15\brdrcf11 \trbrdrl
\brdrs\brdrw15\brdrcf11 \trbrdrb
\brdrs\brdrw15\brdrcf11 \trbrdrr
\brdrs\brdrw15\brdrcf11 \trbrdrh
\brdrs\brdrw15\brdrcf11 \trbrdrv\brdrs\brdrw15\brdrcf11 

\tphmrg\tposxc\tposyc\tdfrmtxtLeft187\tdfrmtxtRight187
\trftsWidth1\trftsWidthB3\trwWidthB504\trftsWidthA3
\trautofit1\trspdl14\trspdt14\trspdb14\trspdr14\trspdfl3\trspdft3
\trspdfb3\trspdfr3\trpaddl115\trpaddr115\trpaddfl3\trpaddfr3 
\clvertalc\clbrdrt

\brdrs\brdrw15\brdrcf11 \clbrdrl
\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \clcbpat17\cltxlrtb
\clftsWidth3\clwWidth4644 \cellx5074\pard 
\qc \li0\ri0\widctlpar\intbl\phmrg\posxc\posyc\dxfrtext187\dfrmtxtx187
\dfrmtxty0\aspalpha\aspnum\faauto\adjustright\rin0\lin0 
{\cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto
\adjustright\rin0\lin0 {\trowd \trgaph115\trleft388\trbrdrt

\brdrs\brdrw15\brdrcf11 \trbrdrl
\brdrs\brdrw15\brdrcf11 \trbrdrb
\brdrs\brdrw15\brdrcf11 \trbrdrr
\brdrs\brdrw15\brdrcf11 \trbrdrh
\brdrs\brdrw15\brdrcf11 \trbrdrv
\brdrs\brdrw15\brdrcf11 

\tphmrg\tposxc\tposyc\tdfrmtxtLeft187\tdfrmtxtRight187
\trftsWidth1\trftsWidthB3\trwWidthB504\trftsWidthA3
\trautofit1\trspdl14\trspdt14\trspdb14\trspdr14\trspdfl3\trspdft3
\trspdfb3\trspdfr3\trpaddl115\trpaddr115\trpaddfl3\trpaddfr3 
\clvertalc\clbrdrt

\brdrs\brdrw15\brdrcf11 \clbrdrl
\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \clcbpat17\cltxlrtb
\clftsWidth3\clwWidth4644 \cellx5074\row }
\trowd \trgaph115\trleft-158\trbrdrt\brdrs\brdrw15\brdrcf11 \trbrdrl

\brdrs\brdrw15\brdrcf11 \trbrdrb
\brdrs\brdrw15\brdrcf11 \trbrdrr
\brdrs\brdrw15\brdrcf11 \trbrdrh
\brdrs\brdrw15\brdrcf11 \trbrdrv\brdrs\brdrw15\brdrcf11 

\tphmrg\tposxc\tposyc\tdfrmtxtLeft187\tdfrmtxtRight187
\trftsWidth1\trftsWidthB3\trftsWidthA3\trwWidthA900
\trautofit1\trspdl14\trspdt14\trspdb14\trspdr14\trspdfl3
\trspdft3\trspdfb3\trspdfr3\trpaddl115\trpaddr115\trpaddfl3
\trpaddfr3 \clvertalt\clbrdrt

\brdrs\brdrw15\brdrcf11 \clbrdrl
\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \clcbpat17\cltxlrtb
\clftsWidth3\clwWidth4248 \cellx4132\pard 

\ql \li0\ri0\widctlpar\intbl\phmrg\posxc\posyc
\dxfrtext187\dfrmtxtx187\dfrmtxty0\aspalpha\aspnum
\faauto\adjustright\rin0\lin0 {\hich\af0\dbch\af17\loch\f0 CELL TWO\cell }\pard 
\ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {

\trowd \trgaph115\trleft-158\trbrdrt\brdrs\brdrw15\brdrcf11 \trbrdrl
\brdrs\brdrw15\brdrcf11 \trbrdrb
\brdrs\brdrw15\brdrcf11 \trbrdrr
\brdrs\brdrw15\brdrcf11 \trbrdrh
\brdrs\brdrw15\brdrcf11 \trbrdrv\brdrs\brdrw15\brdrcf11 

\tphmrg\tposxc\tposyc\tdfrmtxtLeft187\tdfrmtxtRight187
\trftsWidth1\trftsWidthB3\trftsWidthA3\trwWidthA900
\trautofit1\trspdl14\trspdt14\trspdb14\trspdr14
\trspdfl3\trspdft3\trspdfb3\trspdfr3
\trpaddl115\trpaddr115\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt

\brdrs\brdrw15\brdrcf11 \clbrdrl
\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \clcbpat17\cltxlrtb
\clftsWidth3\clwWidth4248 \cellx4132\row }

Table RTF Explained. This is an analysis of the above RTF. It has been restructured for ease of explanation. All text in red are comments. The topmost cell is cell 1 (inside row 1). The bottom cell is cell 2 (inside row 2).

Begin table row defaults for row 1
\trowd

\trgaph115
\trleft388

Row borders
\trbrdrt\brdrs\brdrw15\brdrcf11 \trbrdrl\brdrs\brdrw15\brdrcf11 
\trbrdrb\brdrs\brdrw15\brdrcf11 \trbrdrr\brdrs\brdrw15\brdrcf11 
\trbrdrh\brdrs\brdrw15\brdrcf11 \trbrdrv\brdrs\brdrw15\brdrcf11 

Absolute positioning of the table.  All rows should have the same positioning.
\tphmrg\tposxc\tposyc\tdfrmtxtLeft187\tdfrmtxtRight187

Width of invisible cell before cell one (to simulate offset)
\trftsWidth1\trftsWidthB3\trwWidthB504\trftsWidthA3

Autofit is on
\trautofit1

Default cell spacing for the row
\trspdl14\trspdt14\trspdb14\trspdr14\trspdfl3\trspdft3\trspdfb3\trspdfr3\
trpaddl115\trpaddr115\trpaddfl3\trpaddfr3 

Cell 1 definition beginsVertical alignment of contents
\clvertalc

Cell Borders
\clbrdrt\brdrs\brdrw15\brdrcf11 \clbrdrl\brdrs\brdrw15\brdrcf11 
\clbrdrb\brdrs\brdrw15\brdrcf11 \clbrdrr\brdrs\brdrw15\brdrcf11 

Cell shading
\clcbpat17

Cell text flow
\cltxlrtb

Cell width, using new properties and old ones
\clftsWidth3\clwWidth4644 \cellx5074

Text for cell 1 begins here.  Includes paragraph absolute positioning equivalent to the table absolute positioning above so that old readers get it right.
\pard\plain \qc \li0\ri0\widctlpar\intbl\phmrg\posxc\posyc
\dxfrtext187\dfrmtxtx187\dfrmtxty0\aspalpha\aspnum\faauto
\adjustright\rin0\lin0 \fs24\lang1033\langfe2052\loch\af0\hich
\af0\dbch\af17\cgrid\langnp1033\langfenp2052 
{\hich\af0\dbch\af17\loch\f0 CELL ONE
\par }

Begin definition of nested table inside cell 1
\pard \qc \li0\ri0\widctlpar\intbl\phmrg\posxc\posyc
\dxfrtext187\dfrmtxtx187\dfrmtxty0\aspalpha\aspnum\faauto
\adjustright\rin0\lin0

Notice itap is set to 2, indicating second nesting level.
\itap2 

Nested cell ends with a \nestcell and is followed by a paragraph mark inside a \nonesttables destination which is only read by readers that do not understand nested tables.  This way the text in the nested table is in its own paragraph.
{\hich\af0\dbch\af17\loch\f0 NESTED TABLE\nestcell{\nonesttables
\par }}\pard \ql \li0\ri0\widctlpar\intbl
\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap2 

Nested table properties occur after the text for the nested cell.
{{\*\nesttableprops\trowd \trgaph108\trleft8\trbrdrt
\brdrs\brdrw15\brdrcf11 \trbrdrl
\brdrs\brdrw15\brdrcf11 \trbrdrb
\brdrs\brdrw15\brdrcf11 \trbrdrr
\brdrs\brdrw15\brdrcf11 \trbrdrh
\brdrs\brdrw15\brdrcf11 \trbrdrv
\brdrs\brdrw15\brdrcf11 \trftsWidth1\trautofit1
\trpaddl108\trpaddr108\trpaddfl3\trpaddfr3 \clvertalt\clbrdrt
\brdrs\brdrw15\brdrcf11 \clbrdrl
\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \cltxlrtb\clftsWidth3\clwWidth2340 \cellx2348\nestrow}
{\nonesttables
\par }}
End of nested table properties.Set the default for the row again after nested table!  We're still in the first row and this repeats what was written in the beginning of the row.  Defaults of the table are reset and the cell is closed with a \cell.
\trowd \trgaph115\trleft388\trbrdrt
\brdrs\brdrw15\brdrcf11 \trbrdrl
\brdrs\brdrw15\brdrcf11 \trbrdrb
\brdrs\brdrw15\brdrcf11 \trbrdrr
\brdrs\brdrw15\brdrcf11 \trbrdrh
\brdrs\brdrw15\brdrcf11 \trbrdrv
\brdrs\brdrw15\brdrcf11 
\tphmrg\tposxc\tposyc\tdfrmtxtLeft187\tdfrmtxtRight187
\trftsWidth1\trftsWidthB3\trwWidthB504\trftsWidthA3
\trautofit1\trspdl14\trspdt14\trspdb14\trspdr14\trspdfl3\trspdft3
\trspdfb3\trspdfr3\trpaddl115\trpaddr115\trpaddfl3\trpaddfr3 
\clvertalc\clbrdrt
\brdrs\brdrw15\brdrcf11 \clbrdrl
\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \clcbpat17\cltxlrtb
\clftsWidth3\clwWidth4644 \cellx5074\pard 
\qc \li0\ri0\widctlpar\intbl\phmrg\posxc\posyc
\dxfrtext187\dfrmtxtx187\dfrmtxty0\aspalpha\aspnum\faauto\adjustright
\rin0\lin0 {\cell }\pard \ql \li0\ri0\widctlpar
\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0
This is the end of the table cell.Now the row ends repeating the defaults of the row at the end of it!
{\trowd \trgaph115\trleft388\trbrdrt
\brdrs\brdrw15\brdrcf11 \trbrdrl
\brdrs\brdrw15\brdrcf11 \trbrdrb
\brdrs\brdrw15\brdrcf11 \trbrdrr\brdrs\brdrw15\brdrcf11 \trbrdrh\brdrs\brdrw15\brdrcf11 \trbrdrv
\brdrs\brdrw15\brdrcf11 
\tphmrg\tposxc\tposyc\tdfrmtxtLeft187\tdfrmtxtRight187
\trftsWidth1\trftsWidthB3\trwWidthB504\trftsWidthA3
\trautofit1\trspdl14\trspdt14\trspdb14\trspdr14\trspdfl3
\trspdft3\trspdfb3\trspdfr3\trpaddl115\trpaddr115\trpaddfl3
\trpaddfr3 \clvertalc\clbrdrt
\brdrs\brdrw15\brdrcf11 \clbrdrl
\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \clcbpat17\cltxlrtb
\clftsWidth3\clwWidth4644 \cellx5074\row }
END OF ROW 1Row 2 begins here and is structured similarly.Row defaults
\trowd \trgaph115\trleft-158\trbrdrt\brdrs\brdrw15\brdrcf11 \trbrdrl
\brdrs\brdrw15\brdrcf11 \trbrdrb
\brdrs\brdrw15\brdrcf11 \trbrdrr
\brdrs\brdrw15\brdrcf11 \trbrdrh
\brdrs\brdrw15\brdrcf11 \trbrdrv\brdrs\brdrw15\brdrcf11

Absolute positioning for the table row, matching the previous one.
\tphmrg\tposxc\tposyc\tdfrmtxtLeft187\tdfrmtxtRight187
\trftsWidth1\trftsWidthB3\trftsWidthA3\trwWidthA900
\trautofit1\trspdl14\trspdt14\trspdb14\trspdr14\trspdfl3\trspdft3
\trspdfb3\trspdfr3\trpaddl115\trpaddr115\trpaddfl3\trpaddfr3 

Cell 2 properties
\clvertalt\clbrdrt
\brdrs\brdrw15\brdrcf11 \clbrdrl
\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \clcbpat17\cltxlrtb
\clftsWidth3\clwWidth4248 \cellx4132

Cell 2 text
\pard 
\ql \li0\ri0\widctlpar\intbl\phmrg\posxc\posyc
\dxfrtext187\dfrmtxtx187\dfrmtxty0\aspalpha\aspnum
\faauto\adjustright\rin0\lin0 
{\hich\af0\dbch\af17\loch\f0 CELL TWO\cell }
\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum
\faauto\adjustright\rin0\lin0 
End cell 2 textNow the row ends repeating the defaults of the row at the end of it!
{\trowd \trgaph115\trleft-158\trbrdrt
\brdrs\brdrw15\brdrcf11 \trbrdrl
\brdrs\brdrw15\brdrcf11 \trbrdrb
\brdrs\brdrw15\brdrcf11 \trbrdrr\brdrs\brdrw15\brdrcf11 \trbrdrh\brdrs\brdrw15\brdrcf11 \trbrdrv
\brdrs\brdrw15\brdrcf11 
\tphmrg\tposxc\tposyc\tdfrmtxtLeft187\tdfrmtxtRight187
\trftsWidth1\trftsWidthB3\trftsWidthA3\trwWidthA900
\trautofit1\trspdl14\trspdt14\trspdb14\trspdr14\trspdfl3
\trspdft3\trspdfb3\trspdfr3\trpaddl115\trpaddr115\trpaddfl3
\trpaddfr3 \clvertalt\clbrdrt
\brdrs\brdrw15\brdrcf11 \clbrdrl
\brdrs\brdrw15\brdrcf11 \clbrdrb
\brdrs\brdrw15\brdrcf11 \clbrdrr
\brdrs\brdrw15\brdrcf11 \clcbpat17\cltxlrtb
\clftsWidth3\clwWidth4248 \cellx4132\row }
END OF ROW TWO

Character Text

Character text has the following syntax:

<char> <ptext> | <atext> | '{' <char> '}'
<ptext> (<chrfmt>* <data>+ )+
<data> #PCDATA | <spec> | <pict> | <obj> | <do> | <foot> | <annot> | <field> | <idx> | <toc> | <book>

Font (Character) Formatting Properties

These control words (described as <chrfmt> in the syntax description) change font (character) formatting properties. A control word preceding plain text turns on the specified attribute. Some control words (indicated in the following table by an asterisk following the description) can be turned off by the control word followed by 0 . For example, \b turns on bold, while \b0 turns off bold.

The font (character)-formatting control words are listed in the following table:

Control
Word
Meaning
\plain Reset font (character) formatting properties to a default value defined by the application (for example, bold, underline and italic are disabled; font size is reset to 12 pt). The associated font (character) formatting properties (described in the section Associated Character Properties of this RTF Specification) are also reset.
\animtextN Animated text properties.

1Las Vegas Lights

2Blinking background

3Sparkle text

4Marching black ants

5Marching red ants

6Shimmer

\accnone No accent characters (over dot / over comma).
\accdot Over dot accent.
\acccomma Over comma accent.
\b Bold.*
\caps All capitals.*
\cbN Background color (the default is 0).
\cchsN Indicates any characters not belonging to the default document character set and tells which character set they do belong to. Macintosh character sets are represented by values greater than 255. The values for N correspond to the values for the \ fcharset control word.
\cfN Foreground color (the default is 0).
\charscalexN Character scaling value. The N argument is a value representing a percentage (the default is 100).
\csN Designates character style. If a character style is specified, style properties must be specified with the character run. N refers to an entry in the style table.
\cgridN Character grid.
\g Destination related to character grids.
\gcw Grid column width.
\gridtbl Destination keyword related to character grids.
\deleted Marks the text as deletion revision marked.*
\dnN Subscript position in half-points (the default is 6).
\embo Emboss.
\expndN Expansion or compression of the space between characters in quarter-points; a negative value compresses (the default is 0).
\expndtwN Expansion or compression of the space between characters in twips; a negative value compresses. For backward compatibility, both \expndtw and \expnd should be emitted.
\fittextN Fit the text in the current group in N twips. When N is set to -1 (\fittext-1) it indicates a continuation of the previous \fittextN run. In other words {\fittext1000 Fit this} {\fittext-1 text} fits the string "Fit this text" in 1000 twips.
\fN Font number. N refers to an entry in the font table.
\fsN Font size in half-points (the default is 24).
\i Italic.*
\impr Engrave.
\kerningN Point size (in half-points) above which to kern character pairs. \kerning0 turns off kerning.
\langfeN Applies a language to a character. N is a number corresponding to a language. The \plain control word resets the language property to the language defined by \deflangfeN in the document properties.
\langfenpN Applies a language to a character. N is a number corresponding to a language. The \plain control word resets the language property to the language defined by \deflangfeN in the document properties. Usually follows \langfeN
\langN Applies a language to a character. N is a number corresponding to a language. The \plain control word resets the language property to the language defined by \deflangN in the document properties.
\langnpN Applies a language to a character. N is a number corresponding to a language. The \plain control word resets the language property to the language defined by \deflangN in the document properties. It is identical to \langN, but needed when \noproof is written together with \lang1024 in order to preserve the language of the text that is not being checked for spelling or grammar. Usually follows \langN
\ltrch The character data following this control word will be treated as a left-to-right run (the default).
\rtlch The character data following this control word will be treated as a right-to-left run.
\noproof Do not check spelling or grammar for text in the group. Serves the function of \lang1024. usually \lang1024 is emitted with it for backwards compatibility with old readers.
\nosupersub Turns off superscripting or subscripting.
\nosectexpand Disable character space basement.
\outl Outline.*
\rtlch The character data following this control word will be treated as a right-to-left run.
\scaps Small capitals.*
\shad Shadow.*
\strike Strikethrough.*
\striked1 Double strikethrough. \striked0 turns it off.
\sub Subscripts text and shrinks point size according to font information.
\super Superscripts text and shrinks point size according to font information.
\ul Continuous underline. \ul0 turns off all underlining.
\ulcN Underline color
\uld Dotted underline.
\uldash Dash underline.
\uldashd Dash dot underline.
\uldashdd Dash dot dot underline.
\uldb Double underline.
\ulhwave Heavy wave underline
\ulldash Long dash underline
\ulnone Stops all underlining.
\ulth Thick underline
\ulthd Thick dotted underline
\ulthdash Thick dash underline
\ulthdashd Thick dash dot underline
\ulthdashdd Thick dash dot dot underline
\ulthldash Thick long dash underline
\ululdbwave Double wave underline
\ulw Word underline.
\ulwave Wave underline.
\upN Superscript position in half-points (the default is 6).
\v Hidden text.*
\webhidden Indicates that the text in the group is hidden in Word 2000's Web View and will not be emitted upon saving as web page.

The following table defines the standard languages used by Microsoft. This table was generated by the Unicode group for use with TrueType and Unicode.

Language ID (hexadecimal) ID (decimal)
Afrikaans 0x0436 1078
Albanian 0x041c 1052
Arabic 0x0401 1025
Arabic Algeria 0x1401 5121
Arabic Bahrain 0x3c01 15361
Arabic Egypt 0x0c01 3073
Arabic General 0x0001 1
Arabic Iraq 0x0801 2049
Arabic Jordan 0x2c01 11265
Arabic Kuwait 0x3401 13313
Arabic Lebanon 0x3001 12289
Arabic Libya 0x1001 4097
Arabic Morocco 0x1801 6145
Arabic Oman 0x2001 8193
Arabic Qatar 0x4001 16385
Arabic Syria 0x2801 10241
Arabic Tunisia 0x1c01 7169
Arabic U.A.E. 0x3801 14337
Arabic Yemen 0x2401 9217
Armenian 0x042b 1067
Assamese 0x044d 1101
Azeri Cyrillic 0x082c 2092
Azeri Latin 0x042c 1068
Basque 0x042d 1069
Bengali 0x0445 1093
Bosnia Herzegovina 0x101a 4122
Bulgarian 0x0402 1026
Burmese 0x0455 1109
Byelorussian 0x0423 1059
Catalan 0x0403 1027
Chinese China 0x0804 2052
Chinese General 0x0004 4
Chinese Hong Kong 0x0c04 3076
Chinese Macao 0x0c04 3076
Chinese Singapore 0x1004 4100
Chinese Taiwan 0x0404 1028
Croatian 0x041a 1050
Czech 0x0405 1029
Danish 0x0406 1030
Dutch Belgium 0x0813 2067
Dutch Standard 0x0413 1043
English Australia 0x0c09 3081
English Belize 0x2809 10249
English British 0x0809 2057
English Canada 0x1009 4105
English Caribbean 0x2409 9225
English General 0x0009 9
English Ireland 0x1809 6153
English Jamaica 0x2009 8201
English New Zealand 0x1409 5129
English Philippines 0x3409 13321
English South Africa 0x1c09 7177
English Trinidad 0x2c09 11273
English United States 0x0409 1033
English Zimbabwe 0x0409 1033
Estonian 0x0425 1061
Faerose 0x0438 1080
Farsi 0x0429 1065
Finnish 0x040b 1035
French 0x040c 1036
French Belgium 0x080c 2060
French Cameroon 0x2c0c 11276
French Canada 0x0c0c 3084
French Cote d'Ivoire 0x300c 12300
French Luxembourg 0x140c 5132
French Mali 0x340c 13324
French Monaco 0x180c 6156
French Reunion 0x200c 8204
French Senegal 0x280c 10252
French Swiss 0x100c 4108
French West Indies 0x1c0c 7180
French Democratic Republic of the Congo 0x240c 9228
Frisian 0x0462 1122
Gaelic 0x043c 1084
Gaelic Ireland 0x083c 2108
Galician 0x0456 1110
Georgian 0x0437 1079
German 0x0407 1031
German Austrian 0x0c07 3079
German Liechtenstein 0x1407 5127
German Luxembourg 0x1007 4103
German Switzerland 0x0807 2055
Greek 0x0408 1032
Gujarati 0x0447 1095
Hebrew 0x040d 1037
Hindi 0x0439 1081
Hungarian 0x040e 1038
Icelandic 0x040f 1039
Indonesian 0x0421 1057
Italian 0x0410 1040
Italian Switzerland 0x0810 2064
Japanese 0x0411 1041
Kannada 0x044b 1099
Kashmiri 0x0460 1120
Kashmiri India 0x0860 2144
Kazakh 0x043f 1087
Khmer 0x0453 1107
Kirghiz 0x0440 1088
Konkani 0x0457 1111
Korean 0x0412 1042
Korean Johab 0x0812 2066
Lao 0x0454 1108
Latvian 0x0426 1062
Lithuanian 0x0427 1063
Lithuanian Classic 0x0827 2087
Macedonian (FYROM) 0x043e 1086
Malay 0x043e 1086
Malay Brunei Darussalam 0x083e 2110
Malayalam 0x044c 1100
Maltese 0x043a 1082
Manipuri 0x0458 1112
Marathi 0x044e 1102
Mongolian 0x0450 1104
Nepali 0x0461 1121
Nepali India 0x0861 2145
Norwegian Bokmal 0x0414 1044
Norwegian Nynorsk 0x0814 2068
Oriya 0x0448 1096
Polish 0x0415 1045
Portuguese (Brazil) 0x0416 1046
Portuguese (Portugal) 0x0816 2070
Punjabi 0x0446 1094
Rhaeto-Romanic 0x0417 1047
Romanian 0x0418 1048
Romanian Moldova 0x0818 2072
Russian 0x0419 1049
Russian Moldova 0x0819 2073
Sami Lappish 0x043b 1083
Sanskrit 0x044f 1103
Serbian Cyrillic 0x0c1a 3098
Serbian Latin 0x081a 2074
Sindhi 0x0459 1113
Slovak 0x041b 1051
Slovenian 0x0424 1060
Sorbian 0x042e 1070
Spanish Argentina 0x2c0a 11274
Spanish Bolivia 0x400a 16394
Spanish Chile 0x340a 13322
Spanish Colombia 0x240a 9226
Spanish Costa Rica 0x140a 5130
Spanish Dominican Republic 0x1c0a 7178
Spanish Ecuador 0x300a 12298
Spanish El Salvador 0x440a 17418
Spanish Guatemala 0x100a 4106
Spanish Honduras 0x480a 18442
Spanish Mexico 0x080a 2058
Spanish Modern 0x0c0a 3082
Spanish Nicaragua 0x4c0a 19466
Spanish Panama 0x180a 6154
Spanish Paraguay 0x3c0a 15370
Spanish Peru 0x280a 10250
Spanish Puerto Rico 0x500a 20490
Spanish Traditional 0x040a 1034
Spanish Uruguay 0x380a 14346
Spanish Venezuela 0x200a 8202
Sutu 0x0430 1072
Swahili 0x0441 1089
Swedish 0x041d 1053
Swedish Finland 0x081d 2077
Tajik 0x0428 1064
Tamil 0x0449 1097
Tatar 0x0444 1092
Telugu 0x044a 1098
Thai 0x041e 1054
Tibetan 0x0451 1105
Tsonga 0x0431 1073
Tswana 0x0432 1074
Turkish 0x041f 1055
Turkmen 0x0442 1090
Ukranian 0x0422 1058
Urdu 0x0420 1056
Urdu India 0x0820 2080
Uzbek Cyrillic 0x0843 2115
Uzbek Latin 0x0443 1091
Venda 0x0433 1075
Vietnamese 0x042a 1066
Welsh 0x0452 1106
Xhosa 0x0434 1076
Yiddish 0x043d 1085
Zulu 0x0435 1077

To read negative \expnd values from Word for the Macintosh, an RTF reader should use only the low-order 6 bits of the value read. Word for the Macintosh does not emit negative values for \expnd. Instead, it treats values from 57 through 63 as –7 through –1, respectively (the low-order 6 bits of 57 through 63 are the same as –7 through –1).

Character Borders and Shading

Character shading has the following syntax.

<shading> (\chshdng | <pat>) \chcfpat? \chcbpat?
<pat> \chbghoriz | \chbgvert | \chbgfdiag | \chbgbdiag | \chbgcross | \chbgdcross | \chbgdkhoriz | \chbgdkvert | \chbgdkfdiag | \chbgdkbdiag | \chbgdkcross | \chbgdkdcross
Control Word Meaning
\chbrdr Character border (border always appears on all sides).
\chshdngN Character shading. The N argument is a value representing the shading of the text in hundredths of a percent.
\chcfpatN N is the color of the background pattern, specified as an index into the document's color table.
\chcbpatN N is the fill color, specified as an index into the document's color table.
\chbghoriz Specifies a horizontal background pattern for the text.
\chbgvert Specifies a vertical background pattern for the text.
\chbgfdiag Specifies a forward diagonal background pattern for the text (\\\\).
\chbgbdiag Specifies a backward diagonal background pattern for the text (////).
\chbgcross Specifies a cross background pattern for the text.
\chbgdcross Specifies a diagonal cross background pattern for the text.
\chbgdkhoriz Specifies a dark horizontal background pattern for the text.
\chbgdkvert Specifies a dark vertical background pattern for the text.
\chbgdkfdiag Specifies a dark forward diagonal background pattern for the text (\\\\).
\chbgdkbdiag Specifies a dark backward diagonal background pattern for the text (////).
\chbgdkcross Specifies a dark cross background pattern for the text.
\chbgdkdcross Specifies a dark diagonal cross background pattern for the text.

The color, width, and border style keywords for character borders are the same as the keywords for paragraph borders.

Control WordMeaning
Track Changes (Revision Mark) Properties
\revisedText has been added since revision marking was turned on.
\revauthNIndex into the revision table. The content of the Nth group in the revision table is considered to be the author of that revision.
\revdttmNTime of the revision. The 32-bit DTTM structure is emitted as a long integer.
\crauthNIndex into the revision table. The content of the Nth group in the revision table is considered to be the author of that revision.
Note
   
This keyword is used to indicate formatting revisions, such as bold, italic, and so on.
\crdateNTime of the revision. The 32-bit DTTM structure is emitted as a long integer.
\revauthdelNIndex into the revision table. The content of the Nth group in the revision table is considered to be the author of that deletion.
\revdttmdelNTime of the deletion. The 32-bit DTTM structure is emitted as a long integer.

Associated Character Properties

Bidirectional-aware text processors often need to associate a Latin (or other left-to-right) font with an Arabic or Hebrew (or other right-to-left) font. The association is needed to match commonly used pairs of fonts in name, size, and other attributes. Although RTF defines a broad variety of associated character properties, any implementation may choose not to implement a particular associated character property and share the property between the Latin and Arabic fonts.

Property association uses the following syntax:

<atext> <ltrrun> | <rtlrun>
<ltrrun> \rtlch \af & <aprops>* \ltrch <ptext>
<rtlrun> \ltrch \af & <aprops>* \rtlch <ptext>
<atext> <losbrun> | <hisbrun> | <dbrun>
<losbrun> \hich \af & <aprops> \dbch \af & <aprops> \loch <ptext>
<hisbrun> \loch \af & <aprops> \dbch \af & <aprops> \hich <ptext>
<dbrun> \loch \af & <aprops> \hich \af & <aprops> \dbch <ptext>

Here are some examples of property association:

\ltrch\af2\ab\au\rtlch\u Sample Text

This is a right-to-left run. Text will use the default bidirectional font, and will be underlined. The left-to-right font associated with this run is font 2 (in the font table) with bolding and underlining.

\plain\rtlch\ltrch Sample Text 

This is a left-to-right run. The right-to-left font and the left-to-right font use the default font (specified by \deff).

\rtlch\af5\ab\ai\ltrch\u Sample Text

This is a left-to-right run. The right-to-left font is font 5, bold and italicized. The left-to-right font is the default font, underlined. If the reader does not support underlining in the associated font, both fonts will be underlined.

The property association control words (described as <aprops> in the syntax description) are listed in the following table. Some control words (indicated in the following table by an asterisk following the description) can be turned off by the control word followed by 0.

Control
Word
Meaning
\ab Associated font is bold.*
\acaps Associated font is all capitals.*
\acfN Associated foreground color (the default is 0).
\adnN Associated font is subscript position in half-points (the default is 6).
\aexpndN Expansion or compression of the space between characters in quarter-points; a negative value compresses (the default is 0).
\afN Associated font number (the default is 0).
\afsN Associated font size in half-points (the default is 24).
\ai Associated font is italic.*
\alangN Language ID for the associated font. (This uses the same language ID codes described in the standard language table in the Character Text section of this RTF Specification.)
\aoutl Associated font is outline.*
\ascaps Associated font is small capitals.*
\ashad Associated font is shadow.*
\astrike Associated font is strikethrough.*
\aul Associated font is continuous underline. \aul0 turns off all underlining for the alternate font.
\auld Associated font is dotted underline.
\auldb Associated font is double underline.
\aulnone Associated font is no longer underlined.
\aulw Associated font is word underline.
\aupN Superscript position in half-points (the default is 6).
\loch The text consists of single-byte low-ANSI (0x00–0x7F) characters.
\hich The text consists of single-byte high-ANSI (0x80–0xFF) characters.
\dbch The text consists of double-byte characters.

Highlighting

This property applies highlighting to text. The formatting is not a character format, so it cannot be part of a style definition.

Control
Word
Definition
\highlightN Highlights the specified text. N specifies the color as an index of the color table.

Special Characters

The RTF Specification includes control words for special characters (described as <spec> in the character-text syntax description). If a special-character control word is not recognized by the RTF reader, it is ignored, and the text following it is considered plain text. The RTF Specification is flexible enough to allow new special characters to be added for interchange with other software.

The special RTF characters are listed in the following table.

Control
Word
Meaning
\chdate Current date (as in headers).
\chdpl Current date in long format (for example, Thursday, October 28, 1997).
\chdpa Current date in abbreviated format (for example, Thu, Oct 28, 1997).
\chtime Current time (as in headers).
\chpgn Current page number (as in headers).
\sectnum Current section number (as in headers).
\chftn Automatic footnote reference (footnotes follow in a group).
\chatn Annotation reference (annotation text follows in a group).
\chftnsep Anchoring character for footnote separator.
\chftnsepc Anchoring character for footnote continuation.
\cell End of table cell.
\nestcell End of nested table cell.
\row End of table row.
\nestrow End of nested table row
\par End of paragraph.
\sect End of section and paragraph.
\page Required page break.
\column Required column break.
\line Required line break (no paragraph break).
\lbrN Text wrapping break of type:

0Default line break (just like \line)

1Clear left

2Clear right

3Clear all

Whenever an \lbr is emitted, a \line will be emitted for the benefit of old readers.

\softpage Nonrequired page break. Emitted as it appears in Galley view.
\softcol Nonrequired column break. Emitted as it appears in Galley view.
\softline Nonrequired line break. Emitted as it appears in Galley view.
\softlheightN Nonrequired line height. This is emitted as a prefix to each line.
\tab Tab character.
\emdash Em-dash (—).
\endash En-dash (–).
\emspace Nonbreaking space equal to width of character "m" in current font. Some old RTF writers use the construct '{\emspace  }' (with two spaces before the closing brace) to trick readers unaware of \emspace into parsing a regular space. A reader should interpret this as an \emspace and a regular space.
\enspace Nonbreaking space equal to width of character "n" in current font. Some old RTF writers use the construct '{\enspace  }' (with two spaces before the closing brace) to trick readers unaware of \enspace into parsing a regular space. A correct reader should interpret this as an \enspace and a regular space.
\qmspace One-quarter em space.
\bullet Bullet character.
\lquote Left single quotation mark.
\rquote Right single quotation mark.
\ldblquote Left double quotation mark.
\rdblquote Right double quotation mark.
\| Formula character. (Used by Word 5.1 for the Macintosh as the beginning delimiter for a string of formula typesetting commands.)
\~ Nonbreaking space.
\- Optional hyphen.
\_ Nonbreaking hyphen.
\: Specifies a subentry in an index entry.
\* Marks a destination whose text should be ignored if not understood by the RTF reader.
\'hh A hexadecimal value, based on the specified character set (may be used to identify 8-bit values).
\ltrmark The following characters should be displayed from left to right; usually found at the start of \ltrch runs.
\rtlmark The following characters should be displayed from right to left; usually found at the start of \rtlch runs.
\zwbo Zero-width break opportunity. Used to insert break opportunity between two characters.
\zwnbo Zero-width nonbreak opportunity. Used to remove break opportunity between two characters.
\zwj Zero-width joiner. This is used for ligating (joining) characters.
\zwnj Zero-width nonjoiner. This is used for unligating a character.

A carriage return (character value 13) or linefeed (character value 10) will be treated as a \par control if the character is preceded by a backslash. You must include the backslash; otherwise, RTF ignores the control word. (You may also want to insert a carriage-return/linefeed pair without backslashes at least every 255 characters for better text transmission over communication lines.)

A tab (character value 9) should be treated as a \tab control word. Not all RTF readers understand this; therefore, an RTF writer should always emit the control word for tabs.

The following are the code values for the special characters listed.

Control
Word
Word for Windows and OS/2 Apple Macintosh
\bullet 149 0xA5
\endash 150 0xD1
\emdash 151 0xD0
\lquote 145 0xD4
\rquote 146 0xD5
\ldblquote 147 0xD2
\rdblquote 148 0xD3

Document Variables

Document variables are definable and accessed through macros. The group has the following syntax:

<variables> '{\*' <docvar>'{' <varname> '}' '{' <vartext> '}' '}'*
<docvar> \docvar
<varname> #PCDATA
<vartype> #PCDATA
Control
Word
Definition
\ docvar A group that defines a document variable name and its value.

Bookmarks

This destination may specify one of two control words: \*\bkmkstart, which indicates the start of the specified bookmark, and \*\bkmkend, which indicates the end of the specified bookmark.

Bookmarks have the following syntax:

<book> <bookstart> | <bookend>
<bookstart> '{\*' \bkmkstart (\bkmkcolf? & \bkmkcoll?) #PCDATA '}'
<bookend> '{\*' \bkmkend #PCDATA '}'

A bookmark is shown in the following example:

\pard\plain \fs20 Kuhn believes that science, rather than 
discovering in experience certain structured 
relationships, actually creates (or already participates in) 
a presupposed structure to which it fits the data. 
{\bkmkstart paradigm} Kuhn calls such a presupposed 
structure a paradigm.{\bkmkend paradigm}

The bookmark start and the bookmark end are matched with the bookmark tag. In the example, the bookmark tag is "paradigm." Each bookmark start should have a matching bookmark end; however, the bookmark start and the bookmark end may be in any order.

\bkmkcolfN is used to denote the first column of a table covered by a bookmark. If it is not included, the first column is assumed. \bkmkcollN is used to denote the last column. If it is not used, the last column is assumed. These controls are used within the \*\bkmkstart destination following the \bkmkstart control. For example, {\*\bkmkstart\bkmkcolf2\bkmkcoll5 Table1} places the bookmark "Table1" on columns 2 through 5 of a table.

Pictures

An RTF file can include pictures created with other applications. These pictures can be in hexadecimal (the default) or binary format. Pictures are destinations, and begin with the \pict control word. The \pict keyword is preceded by \*\shppict destination control keyword as described in the following example. A picture destination has the following syntax:

<pict> '{' \pict (<brdr>? & <shading>? & <picttype> & <pictsize> & <metafileinfo>?) <data> '}'
<picttype> | \emfblip | \pngblip | \jpegblip | \macpict | \pmmetafile | \wmetafile | \dibitmap <bitmapinfo> | \wbitmap <bitmapinfo>
<bitmapinfo> \wbmbitspixel & \wbmplanes & \wbmwidthbytes
<pictsize> (\picw & \pich) \picwgoal? & \pichgoal? \picscalex? & \picscaley? & \picscaled? & \piccropt? & \piccropb? & \piccropr? & \piccropl?
<metafileinfo> \picbmp & \picbpp
<data> (\bin #BDATA) | #SDATA

These control words are described in the following table. Some measurements in this table are in twips; a twip is one-twentieth of a point.

Control
Word
Meaning
\emfblip Source of the picture is an EMF (enhanced metafile).
\pngblip Source of the picture is a PNG.
\jpegblip Source of the picture is a JPEG.
\shppict Specifies a Word 97-2000 picture. This is a destination control word.
\nonshppict Specifies that Word 97-2000 has written a {\pict destination that it will not read on input. This keyword is for compatibility with other readers.
\macpict Source of the picture is QuickDraw.
\pmmetafileN Source of the picture is an OS/2 metafile. The N argument identifies the metafile type. The N values are described in the \pmmetafile table below.
\wmetafileN Source of the picture is a Windows metafile. The N argument identifies the metafile type (the default is 1).
\dibitmapN Source of the picture is a Windows device-independent bitmap. The N argument identifies the bitmap type (must equal 0).

The information to be included in RTF from a Windows device-independent bitmap is the concatenation of the BITMAPINFO structure followed by the actual pixel data.

\wbitmapN Source of the picture is a Windows device-dependent bitmap. The N argument identifies the bitmap type (must equal 0).

The information to be included in RTF from a Windows device-dependent bitmap is the result of the GetBitmapBits function.

Example:

{\*\shppict {\pict \emfblip ….. }}{\nonshppict {\pict ….}}

For more information on the GetDIBits and GetBitmapBits functions and the structure of Windows device-independent and device-dependent bitmaps, see Volume 1 and Volume 2 of the Programmer's Reference in the Microsoft Windows 3.1 Software Development Kit. For best device-independence and interoperability with Microsoft products, however, use of the \wbitmap and \dibitmap control words is discouraged. Rather, bitmaps should be embedded within Windows metafiles and the \wmetafile control word used. For more information on embedding bitmaps within metafiles, see Volume 1 and Volume 2 of the Programmer's Reference in the Microsoft Windows 3.1 Software Development Kit.

Control
Word
Meaning
Bitmap Information
\wbmbitspixelNNumber of adjacent color bits on each plane needed to define a pixel (the default is 1). Possible values are 1 (monochrome), 4 (16 colors), 8 (256 colors) and 24 (RGB).
\wbmplanesNNumber of bitmap color planes (must equal 1).
\wbmwidthbytesNSpecifies the number of bytes in each raster line. This value must be an even number because the Windows graphics device interface (GDI) assumes that the bit values of a bitmap form an array of integer (two-byte) values. In other words, \wbmwidthbytes times 8 must be the next multiple of 16 greater than or equal to the \picw (bitmap width in pixels) value.
Picture Size, Scaling, and Cropping
\picwNxExt field if the picture is a Windows metafile; picture width in pixels if the picture is a bitmap or from QuickDraw. The N argument is a long integer.
\pichNyExt field if the picture is a Windows metafile; picture height in pixels if the picture is a bitmap or from QuickDraw. The N argument is a long integer.
\picwgoalNDesired width of the picture in twips. The N argument is a long integer.
\pichgoalNDesired height of the picture in twips. The N argument is a long integer.
\picscalexNHorizontal scaling value. The N argument is a value representing a percentage (the default is 100).
\picscaleyNVertical scaling value. The N argument is a value representing a percentage (the default is 100).
\picscaledScales the picture to fit within the specified frame. Used only with \macpict pictures.
\picpropIndicates that shape properties are applied to an inline picture. This is a destination control word.
\defshpIndicates that the inline picture is a WordArt shape.
\piccroptNTop cropping value in twips. A positive value crops toward the center of the picture; a negative value crops away from the center, adding a space border around picture (the default is 0).
\piccropbNBottom cropping value in twips. A positive value crops toward the center of the picture; a negative value crops away from the center, adding a space border around picture (the default is 0).
\piccroplNLeft cropping value in twips. A positive value crops toward the center of the picture; a negative value crops away from the center, adding a space border around picture (the default is 0).
\piccroprNRight cropping value in twips. A positive value crops toward the center of the picture; a negative value crops away from the center, adding a space border around picture (the default is 0).
Metafile Information
\picbmpSpecifies whether a metafile contains a bitmap.
\picbppNSpecifies the bits per pixel in a metafile bitmap. The valid range is 1–32, with 1, 4, 8, and 24 being recognized.
Picture Data
\binNThe picture is in binary format. The numeric parameter N is the number of bytes that follow. Unlike all other controls, this control word takes a 32-bit parameter.
\blipupiNN represents units per inch on a picture (only certain image types need or output this)
\blipuid XXXXXUsed as: {\*\blipuid XXXXX} where XXXX is a 16-byte identification number for the image.
\bliptagNA mostly unique identifier for a picture, where N is a long integer value.

The \wbitmap control word is optional. If no other picture type is specified, the picture is assumed to be a Windows bitmap. If \wmetafile is specified, the N argument can be one of the following types.

Type N argument
MM_TEXT 1
MM_LOMETRIC 2
MM_HIMETRIC 3
MM_LOENGLISH 4
MM_HIENGLISH 5
MM_TWIPS 6
MM_ISOTROPIC 7
MM_ANISOTROPIC 8

For more information about these types, see volume 1 of the Programmer's Reference in the Microsoft Windows 3.1 Software Development Kit.

If \pmmetafile is specified, the N argument can be one of the following types.

Type N argument
PU_ARBITRARY 0x0004
PU_PELS 0x0008
PU_LOMETRIC 0x000C
PU_HIMETRIC 0x0010
PU_LOENGLISH 0x0014
PU_HIENGLISH 0x0018
PU_TWIPS 0x001C

For more information about these types, see volume 2 of the OS/2 Programmer's Reference.

Be careful with spaces following control words when dealing with pictures in binary format. When reading files, RTF considers the first space after a control word the delimiter and subsequent spaces part of the document text. Therefore, any extra spaces are attached to the picture, with unpredictable results.

RTF writers should not use the carriage-return/linefeed (CR/LF) combination to break up pictures in binary format. If they do, the CR/LF combination is treated as literal text and considered part of the picture data.

The picture in hexadecimal or binary format follows the picture-destination control words. The following example illustrates the destination format:

{\pict\wbitmap0\picw170\pich77\wbmbitspixel1\wbmplanes1\wbmwidthbytes22
\picwgoal505
\pichgoal221
\picscalex172
\picscaley172
49f2000000000273023d1101a030
3901000a000000000273023d98
0048000200000275
02040000200010275023e000000000
273023d000002b90002b90002
b90002b90002b9
0002b90002b90002b90002b90002b90002
b92222b90002b90002b90
002b90002b9
0002b90002b90002b90002b9000

Objects

Microsoft OLE links, Microsoft OLE embedded objects, and Macintosh Edition Manager subscriber objects are represented in RTF as objects. Objects are destinations that contain a data part and a result part. The data part is generally hidden to the application that produced the document. A separate application uses the data and supplies the appearance of the data. This appearance is the result part of the object.

The representation of objects in RTF is designed to allow RTF readers that don't understand objects or don't use a particular type of object to use the current result in place of the object. This allows the appearance of the object to be maintained through the conversion even though the object functionality is lost. Each object comes with optional information about the object, a required destination that contains the object data, and an optional result that contains the current appearance of the object. This result contains standard RTF. It is an important responsibility of the RTF writer to provide the result, so that existing RTF readers that either do not support objects or do not support the particular type of object will be able to display the object.

When the object is an OLE embedded or linked object, the data part of the object is the structure produced by the OLESaveToStream function. Some OLE clients rely on the OLE system to render the object and a copy of the result is not available to the RTF writer for that application. For these cases, the object result can be extracted from the structure produced by the OLESaveToStream function. For information about the OLESaveToStream function, see the Microsoft Object Linking and Embedding Software Development Kit.

The syntax for this destination is:

<obj> ( '{' \object (<objtype> & <objmod>? & <objclass>? & <objname>? & <objtime>? & <objsize>? & <rsltmod>?) <objdata> <result> '}' ) | <pubobject>
<objtype> \objemb | \objlink | \objautlink | \objsub | \objpub | \objicemb | objhtml | objocx
<objmod> \linkself? & \objlock? | \objupdate?
<objclass> '{\*' \objclass #PCDATA '}'
<objname> '{\*' \objname #PCDATA '}'
<objtime> '{\*' \objtime <time> '}'
<rsltmod> \rsltmerge? & <rslttype>?
<rslttype> \rsltrtf | \rslttxt | \rsltpict | \rsltbmp | \rslthtml
<objsize> \objsetsize? & \objalign? & \objtransy? & <objhw>? & \objcropt? & \objcropb? & \objcropl? & \objcropr? & \objscalex? & \objscaley?
<objhw> \objh & \objw
<objdata> '{\*' \objdata (<objalias>? & <objsect>?) <data> '}'
<objalias> '{\*' \objalias <data> '}'
<objsect> '{\*' \objsect <data> '}'
<result> '{' \result <para>+ '}'
Control
Word
Meaning
Object Type
\objembAn object type of OLE embedded object. If no type is given for the object, the object is assumed to be of type \objemb.
\objlinkAn object type of OLE link.
\objautlinkAn object type of OLE autolink.
\objsubAn object type of Macintosh Edition Manager subscriber.
\objpubAn object type of Macintosh Edition Manager publisher.
\objicembAn object type of MS Word for the Macintosh Installable Command (IC) Embedder.
\objhtmlAn object type of HTML control.
\objocxAn object type of OLE control.
Object Information
\linkselfThe object is a link to another part of the same document.
\objlockLocks the object from any updates.
\objupdateForces an update to the object before displaying it. Note that this will override any values in the <objsize> control words, but reasonable values should always be provided for these to maintain backwards compatibility.
\objclassThe text argument is the object class to use for this object; ignore the class specified in the object data. This is a destination control word.
\objnameThe text argument is the name of this object. This is a destination control word.
\objtimeDescribes the time that the object was last updated.
Object Size, Position, Cropping, and Scaling
\objhNN is the original object height in twips, assuming the object has a graphical representation.
\objwNN is the original object width in twips, assuming the object has a graphical representation.
\objsetsizeForces the object server to set the object's dimensions to that specified by the client.
\objalignNN is the distance in twips from the left edge of the objects that should be aligned on a tab stop. This is needed to place Equation Editor equations correctly in line.
\objtransyNN is the distance in twips the objects should be moved vertically with respect to the baseline. This is needed to place Math Type equations correctly in line.
\objcroptNN is the top cropping distance in twips.
\objcropbNN is the bottom cropping distance in twips.
\objcroplNN is the left cropping distance in twips.
\objcroprNN is the right cropping distance in twips.
\objscalexNN is the horizontal scaling percentage.
\objscaleyNN is the vertical scaling percentage.
Object Data
\objdataThis subdestination contains the data for the object in the appropriate format; OLE objects are in OLESaveToStream format. This is a destination control word.
\objaliasThis subdestination contains the alias record for the publisher object for the Macintosh Edition Manager. This is a destination control word.
\objsectThis subdestination contains the section record for the publisher object for the Macintosh Edition Manager. This is a destination control word.
Object Result
\rsltrtfForces the result to be rich text format, if possible.
\rsltpictForces the result to be a Windows metafile or MacPict image format, if possible.
\rsltbmpForces the result to be a bitmap, if possible.
\rslttxtForces the result to be plain text, if possible.
\rslthtmlForces the result to be HTML, if possible.
\rsltmergeUses the formatting of the current result whenever a new result is obtained.
\resultThe result destination is optional in the \object destination. It contains the last update of the result of the object. The data of the result destination should be standard RTF so that RTF readers that don't understand objects or the type of object represented can use the current result in the object's place to maintain appearance. This is a destination control word.

When Word is used as an editor for Mail, the following control word can be emitted. It is not seen in other situations.

Control
Word
Meaning
\objattph Object attachment placeholder. Used in the RTF stream when Word is started as a mail editor and the message contains attachments. The control word tells where in the text stream the attachment should be placed. It does not define the actual attachment.

Macintosh Edition Manager Publisher Objects

Word for the Macintosh writes publisher objects for the Macintosh Edition Manager in terms of bookmarks (see the Bookmarks section of this RTF Specification). The range of publisher objects are marked as bookmarks, so these controls are all used within the \bkmkstart destination. The RTF syntax for a publisher object is:

<pubobject> '{\*' \bkmkstart \bkmkpub \pubauto? (<objalias>? & <objsect>) #PCDATA '}'
Control
Word
Meaning
\bkmkpub The bookmark marks a Macintosh Edition Manager publisher object.
\pubauto The publisher object updates all Macintosh Edition Manager subscribers of this object automatically whenever it is edited.

Drawing Objects

Word 6.0/95 RTF

Drawing objects and the drawing primitives enumerated within drawing object groups use the syntax described by the following tables.

<do> '{\*' \do <dohead> <dpinfo>'}'
<dohead> <dobx> <doby> <dodhgt> <dolock>?
<dobx> \dobxpage | \dobxcolumn | \dobxmargin
<doby> \dobypage | \dobypara | \dobymargin
<dodhgt> \dodhgt
<dolock> \dolock
<dpinfo> <dpgroup> | <dpcallout> | <dpsimple>
<dpgroup> \dpgroup \dpcount <dphead> <dpinfo>+ \dpendgroup <dphead>
<dpcallout> \dpcallout <cotype> <coangle>? <coaccent>? <cosmartattach>? <cobestfit>? <cominusx>? <cominusy>? <coborder>? <codescent>? \dpcooffset \dpcolength <dphead> <dppolyline> <dphead> <dpprops> <dptextbox> <dphead> <dpprops>
<dpsimple> <dpsimpledpk> <dphead> <dpprops>
<dpsimpledpk> <dpline> | <dprect> | <dptextbox> | <dpellipse> | <dppolyline> | <dparc>
<dpline> \dpline <dppt> <dppt>
<dprect> \dprect (\dproundr)?
<dptextbox> \dptxbx (\dptxlrtb | \dptxtbrl | \dptxbtlr | \dptxlrtbv | \dptxtbrlv)? \dptxbxmar '{' \dptxbxtext <para>+'}'
<dpellipse> \dpellipse
<dparc> \dparc \dparcflipx? \dparcflipy?
<dppolyline> \dppolyline (\dppolygon)? \dppolycount <dppt>+
<dppt> \dpptx \dppty
<dphead> \dpx \dpy \dpxsize \dpysize

Note

   

In <dpgroup>, the number of <dpinfo>s is equal to the argument of \dpcount, whereas in <dppolyline> the number of <dppt>s is equal to the argument of \dppolycount.

The following elements of the drawing-object syntax pertain specifically to callout objects:

<cotype> \dpcotright | \dpcotsingle | \dpcotdouble | \dpcottriple
<coangle> \dpcoa
<coaccent> \dpcoaccent
<cosmartattach> \dpcosmarta
<cobestfit> \dpcobestfit
<cominusx> \dpcominusx
<cominusy> \dpcominusy
<coborder> \dpcoborder
<codescent> \dpcodtop | \dpcodcenter | \dpcodbottom | \dpcodabs

The remaining elements of the drawing object syntax are properties applied to individual drawn primitives:

<dpprops> <lineprops>? <fillprops>? <endstylestart>? <endstyleend>? <shadow>?
<lineprops> <linestyle> <linecolor> \dplinew
<linestyle> \dplinesolid | \dplinehollow | \dplinedash | \dplinedot | \dplinedado | \dplinedadodo
<linecolor> <linegray> | <linergb>
<linegray> \dplinegray
<linergb> \dplinecor \dplinecog \dplinecob<linepal>?
<linepal> \dplinepal
<fillprops> <fillcolorfg> <fillcolorbg> \dpfillpat
<fillcolorfg> <fillfggray> | <fillfgrgb>
<fillfggray> \dpfillfggray
<fillfgrgb> \dpfillfgcr \dpfillfgcg \dpfillfgcb<fillfgpal>?
<fillfgpal> \dpfillfgpal
<fillcolorbg> <fillbggray> | <fillbgrgb>
<fillbggray> \dpfillbggray
<fillbgrgb> \dpfillbgcr \dpfillbgcg \dpfillbgcb<fillbgpal>?
<fillbgpal> \dpfillbgpal
<endstylestart> <arrowstartfill> \dpastartl \dpastartw
<arrowstartfill> \dpastartsol | \dpastarthol
<endstyleend> <arrowendfill> \dpaendl \dpaendw
<arrowendfill> \dpaendsol | \dpaendhol
<shadow> \dpshadow \dpshadx \dpshady

The following table describes the control words for the drawing object group in detail. All color values are RGB values between 0-255. All distances are in twips. All other values are as indicated.

Control
Word
Definition
\doIndicates a drawing object is to be inserted at this point in the character stream. This is a destination control word.
\dolockThe drawing object's anchor is locked and cannot be moved.
\dobxpageThe drawing object is page relative in the x-direction.
\dobxcolumnThe drawing object is column relative in the x-direction.
\dobxmarginThe drawing object is margin relative in the x-direction.
\dobypageThe drawing object is page relative in the y-direction.
\dobyparaThe drawing object is paragraph relative in the y-direction.
\dobymarginThe drawing object is margin relative in the y-direction.
\dodhgtNThe drawing object is positioned at the following numeric address in the z-ordering.
Drawing Primitives
\dpgroupBegin group of drawing primitives.
\dpcountNNumber of drawing primitives in the current group.
\dpendgroupEnd group of drawing primitives.
\dparc Arc drawing primitive.
\dpcalloutCallout drawing primitive, which consists of both a polyline and a text box.
\dpellipseEllipse drawing primitive.
\dplineLine drawing primitive.
\dppolygonPolygon drawing primitive (closed polyline).
\dppolylinePolyline drawing primitive.
\dprectRectangle drawing primitive.
\dptxbxText box drawing primitive.
Position and Size
\dpxNX-offset of the drawing primitive from its anchor.
\dpxsizeNX-size of the drawing primitive.
\dpyNY-offset of the drawing primitive from its anchor.
\dpysizeNY-size of the drawing primitive.
Callouts
\dpcoaNAngle of callout's diagonal line is restricted to one of the following: 0, 30, 45, 60, or 90. If this control word is absent, the callout has an arbitrary angle, indicated by the coordinates of its primitives.
\dpcoaccentAccent bar on callout (vertical bar between polyline and text box).
\dpcobestfitBest fit callout (x-length of each line in callout is similar).
\dpcoborderVisible border on callout text box.
\dpcodabsAbsolute distance-attached polyline.
\dpcodbottomBottom-attached polyline.
\dpcodcenterCenter-attached polyline.
\dpcodtopTop-attached callout.
\dpcodescentNThe descent of the callout
\dpcolengthN Length of callout.
\dpcominusxText box falls in quadrants II or III relative to polyline origin.
\dpcominusyText box falls in quadrants III or IV relative to polyline origin.
\dpcooffsetN Offset of callout. This is the distance between the end of the polyline and the edge of the text box.
\dpcosmartaAuto-attached callout. Polyline will attach to either the top or bottom of the text box depending on the relative quadrant.
\dpcotdoubleDouble line callout.
\dpcotrightRight angle callout.
\dpcotsingleSingle line callout.
\dpcottripleTriple line callout.
Text Boxes and Rectangles
\dptxbxmarN Internal margin of the text box.
\dptxbxtext Group that contains the text of the text box.
\dptxlrtbText box flows from left to right and top to bottom (default).
\dptxtbrlText box flows from right to left and top to bottom.
\dptxbtlrText box flows from left to right and bottom to top.
\dptxlrtbvText box flows from left to right and top to bottom, vertically.
\dptxtbrlvText box flows from top to bottom and right to left, vertically.
\dproundrRectangle is a round rectangle.
Lines and Polylines
\dpptxN X-coordinate of the current vertex (only for lines and polylines). The coordinate order for a point must be x, y.
\dpptyN Y-coordinate of the current vertex (only for lines and polylines). The coordinate order for a point must be x, y.
\dppolycountN Number of vertices in polyline drawing primitive.
Arcs
\dparcflipxThis indicates that the end point of the arc is to the right of the start point. Arcs are drawn counter-clockwise.
\dparcflipyThis indicates that the end point of the arc is below the start point. Arcs are drawn counter-clockwise.
Line Style
\dplinecobN Blue value for line color.
\dplinecogN Green value for line color.
\dplinecorN Red value for line color.
\dplinepalRender line color using the PALETTERGB macro instead of the RGB macro in Windows.
\dplinedadoDashed-dotted line style.
\dplinedadodo Dashed-dotted-dotted line style.
\dplinedash Dashed line style.
\dplinedot Dotted line style.
\dplinegrayN Grayscale value for line color (in half-percentages).
\dplinehollow Hollow line style (no line color).
\dplinesolid Solid line style.
\dplinewN Thickness of line (in twips).
Arrow Style
\dpaendholHollow end arrow (lines only).
\dpaendlN Length of end arrow, relative to pen width:

1Small

2Medium

3Large

\dpaendsolSolid end arrow (lines only).
\dpaendwN Width of end arrow, relative to pen width:

1Small

2Medium

3Large

\dpastartholHollow start arrow (lines only).
\dpastartlN Length of start arrow, relative to pen width:

1Small

2Medium

3Large

\dpastartsolSolid start arrow (lines only).
\dpastartwN Width of start arrow, relative to pen width:

1Small

2Medium

3Large

Fill Pattern
\dpfillbgcbN Blue value for background fill color.
\dpfillbgcgN Green value for background fill color.
\dpfillbgcrN Red value for background fill color.
\dpfillbgpalRender fill background color using the PALETTERGB macro instead of the RGB macro in Windows.
\dpfillbggrayN Grayscale value for background fill (in half-percentages).
\dpfillfgcbN Blue value for foreground fill color.
\dpfillfgcgN Green value for foreground fill color.
\dpfillfgcrN Red value for foreground fill color.
\dpfillfgpalRender fill foreground color using the PALETTERGB macro instead of the RGB macro in Windows.
\dpfillfggrayN Grayscale value for foreground fill (in half-percentages).
\dpfillpatN Index into a list of fill patterns. See below for list.
Shadow
\dpshadow Current drawing primitive has a shadow.
\dpshadxN X-offset of the shadow.
\dpshadyN Y-offset of the shadow.

The following values are available for specifying fill patterns in drawing objects with the \dpfillpat control word.

Value Fill pattern
0 Clear (no pattern)
1 Solid (100%)
2 5%
3 10%
4 20%
5 25%
6 30%
7 40%
8 50%
9 60%
10 70%
11 75%
12 80%
13 90%
14 Dark horizontal lines
15 Dark vertical lines
16 Dark left-diagonal lines (\\\)
17 Dark right-diagonal lines (///)
18 Dark grid lines
19 Dark trellis lines
20 Light horizontal lines
21 Light vertical lines
22 Light left-diagonal lines (\\\)
23 Light right-diagonal lines (///)
24 Light grid lines
25 Light trellis lines

Word 97-2000 RTF for Drawing Objects (Shapes)

Basic Format

The basic format for drawing objects in RTF is as follows

{ \shp   ........  { \*\shpinst  { \spp  { \sn .......... }  { \sp .............. }  }  }
            { \shprslt   ............... }   }

The first destination (\shp) is always present. This control word groups everything related to a shape together. Following the destination change, comes basic information regarding the shape. The following keywords with values can appear in any order after the "{ \shp"  control word.

Control
Word
Meaning
Shape Keywords
\shpleftNThe value N is a measurement in twips. Specifies position of shape from the left of the anchor.
\shptopNThe value N is a measurement in twips. Specifies position of shape from top of the anchor.
\shpbottomNThe value N is a measurement in twips. Specifies position of shape from bottom of the anchor.
\shprightNThe value N is a measurement in twips. Specifies position of shape from right of the anchor.
\shplidNA number that is unique to each shape. This keyword is primarily used for linked text boxes. The value N is a long integer.
\shpzNDescribes z-order of shape. It starts at 0 for the back most shape and proceed to N for the top most shape. The shapes that appear inside of the header document will have a separate z-order as compared to the z-order of the shapes in the main document. For instance the back-most shape in the header will have z-order number 0, and the back-most main-document shape will also have z-order number 0.
\shpfhdrN0 if the shape is in the main document. 1 if the shape is in the header document.
\shpbxpage The shape is positioned relative to the page in the x (horizontal) direction.
\shpbxmargin The shape is positioned relative to the margin in the x (horizontal) direction.
\shpbxcolumnThe shape is positioned relative to the column in the x (horizontal) direction.
\shpbxignoreIgnore \shpbxpage, \shpbxmargin, and \shpbxcolumn, in favor of \posrelh. The ignored properties will be written for backwards compatibility with older readers that do not understand \posrelh.
\shpbypage The shape is positioned relative to the page in the y (vertical) direction.
\shpbymargin The shape is positioned relative to the margin in the y (vertical) direction.
\shpbyparaThe shape is positioned relative to the paragraph in the y (vertical) direction.
\shpbyignoreIgnore \shpbypage, \shpbymargin, and \shpbxpara, in favor of \posrelh. The ignored properties will be written for backwards compatibility with older readers that do not understand \posrelh.
\shpwrNDescribes the type of wrap for the shape.

1Wrap around top and bottom of shape (no text allowed beside shape)

2Wrap around shape

3None (wrap as if shape isn't present)

4Wrap tightly around shape

5Wrap text through shape

\shpwrkNWrap on side (for types 2 and 4 for \shpwrN ).

0Wrap both sides of shape

1Wrap left side only

2Wrap right side only

3Wrap only on largest side

\shpfblwtxtNDescribes relative z-ordering.

0Text is below shape

1Shape is below text

\shplockanchorLock anchor for shape.
\shptxtText for a shape. The text must come after all the other properties for the shape (inside the \shpinst destination) in the following format:
{ \shptxt  Any Valid RTF for the current textbox }
Note
   
For linked text boxes, the first text box of the linked set has the entire story, so all following text boxes will not have a \shptxt field.
\shprsltThis is where the Word 6.0/95 drawn object RTF can be placed.
\shpgrpSpecifies a group shape. The parameters following this keyword are the same as those following \shp. The order of the shapes inside a group is from bottom to top in z-order.

Inside of a \shpgrp, no { \shprslt .... } fields would be generated (that is, only the root-level shape can have a \shprslt field (this field describes the entire group). For example:

{ \shpgrp  ....... { \shp ..... (and all sub-items as usual) }
              { \shp ......(and all sub-items as usual) }
Note
   
A
{ \shpgrp ...... }
can be substituted for a
{ \shp ..... }
at any place (to accomplish groups inside of groups).

With the exception of \shplid, these do not apply for shapes that are within a group. For more information about groups, see the "Introduction" section of this RTF Specification.

Control
Word
Meaning
\background Specifies the document background. This is a destination keyword. It contains the { \shp keyword and all the shape properties.

Drawing Object Properties

The { \shp ............ control word is followed by { \*\shpinst.

The bulk of a shape is defined as a series of properties. Following the { \*\shpinst   is a list of all the properties of a shape each in the following format:

{ \sp  { \sn PropertyName } { \sv PropertyValueInformation } }

The control word for the drawing object property is \sp. Each property has a pair of name (\sn) and value (\sv) control words placed in the shape property group. For example, the vertical flip property is represented as:

{\sp{\sn fFlipV}{\sv 1}}

Here, the name of the property is fFlipV and the value is 1, which indicates True. All shape properties follow this basic format. Only properties that have been explicitly set for a shape are written out in RTF format. Other properties assume the default values (a property may be set to the default value explicitly).

The following table describes all the names of properties for drawing objects, together with the type of their corresponding value.

PropertyType of
Value
MeaningDefault
Position
posh  Horizontal alignment:

1Left

2Center

3Right

4Inside

5Outside

This overrides the absolute position specified in \shpleftN and \shprightN.

Absolute position as specified in \shpleftN and \shprightN.
posrelh   Position horizontally relative to:

0Margin

1Page

2Column

3Character

2, if posh is present
posv  Vertical alignment:

1Center

2Column

3Bottom

4Inside

5Outside

This overrides the absolute position specified in \shptopN and \shpbottomN..

Absolute position as specified in \shptopN and \shpbottomN..
posrelv  Position horizontally relative to:

0Margin

1Page

2Paragraph

3Line

2 is the assumed value if the property is not explicitly written.

2, if posv is present
fLayoutInCellBooleanAllow shape to anchor and position inside table cells.FALSE
fAllowOverlapBooleanAllow shape to overlap other shapes with the following exception:

A shape with None wrapping (\shpwr3) can always overlap an object with other types of wrapping and vice-versa.

TRUE
fChangePageBooleanAnchor may change pageFALSE
Object Type
fIsBulletBooleanIndicates whether a picture was inserted as a picture bullet.FALSE.
RotationAngleRotation of the shape.0
fFlipVBooleanVertical flip, applied after the rotation.FALSE
fFlipHBooleanHorizontal flip, applied after the rotation.FALSE
ShapeType  See below for values. 0 indicates user-drawn freeforms and polygons.   
wzNameStringShape name (only set through Visual Basic® for Applications).NULL
pWrapPolygonVerticesArrayPoints of the text wrap polygon.NULL
dxWrapDistLeftEMULeft wrapping distance from text.114305
dyWrapDistTopEMUTop wrapping distance from text.0
dxWrapDistRightEMURight wrapping distance from text.114305
dyWrapDistBottomEMUBottom wrapping distance from text.0
fBehindDocumentBooleanPlace the shape behind text.FALSE
fIsButtonBooleanA button shape (i.e., clicking performs an action). Set for shapes with attached hyperlinks or macros.FALSE
fHiddenBooleanDo not display or print (only set through Visual Basic for Applications).FALSE
pihlShapeHyperlinkThe hyperlink in the shape.NULL
fArrowheadsOKBooleanAllow arrowheadsFALSE
fBackgroundBooleanThis is the background shape.FALSE
fDeleteAttachedObjectBooleanDelete object attached to shapeFALSE
fEditedWrapBooleanThe shape's wrap polygon has been editedFALSE
fHiddenBooleanDo not displayFALSE
fHitTestFillBooleanHit test fillTRUE
fHitTestLineBooleanHit test linesTRUE
fInitiatorBooleanSet by the solverNULL
fNoFillHitTestBooleanHit test a shape as though filledFALSE
fNoHitTestPictureBooleanDo not hit test the pictureFALSE
fNoLineDrawDashBooleanDraw a dashed line if no lineFALSE
fOleIconBooleanFor OLE objects, whether the object is in icon formFALSE
fOnDblClickNotifyBooleanNotify client on a double clickFALSE
fOneDBoolean1D adjustmentFALSE
fPreferRelativeResizeBooleanFor UI only. Prefer relative resizing. FALSE
fPrintBooleanPrint this shapeTRUE
hspMasterShape IDmaster shapeNULL
hspNextShape IDID of the next shape (used by Word for linked textboxes)NULL
xLimoLong integerdefines the limo stretch point  
yLimoLong integerdefines the limo stretch point  
Lock
fLockRotationBooleanLock rotation.FALSE
fLockAspectRatioBooleanLock aspect ratio.FALSE
fLockAgainstSelectBooleanLock against selection.FALSE
fLockCroppingBooleanLock against croppingFALSE
fLockVerticiesBooleanLock against edit mode.FALSE
fLockTextBooleanLock text against editingFALSE
fLockAdjustHandlesBooleanLock adjust handlesFALSE
fLockAgainstGroupingBooleanLock against groupingFALSE
fLockShapeTypeBooleanLock the shape type (don't allow Change Shape)FALSE
Text Box
dxTextLeftEMULeft internal margin of the text box.91440
dyTextTopEMUTop internal margin of the text box.45720
dxTextRightEMURight internal margin of the text box.91440
dyTextBottomEMUBottom internal margin of the text box.45720
WrapText  Wrap text at shape margins:

0Square

1Tight

2None

3Top Bottom

4Through

0
anchorText  Text anchor point:

0Top

1Middle

2Bottom

3Top Centered

4Middle Centered

5Bottom Centered

6Bottom Centered Baseline

0
txflTextFlow  Text flow:

0Horizontal non-ASCII font

1Top to bottom ASCII font

2Bottom to top non-ASCII font

3Top to bottom non-ASCII font

4Horizontal ASCII font

0
cdirFontDirectionFont rotation:

0Right

1Down

2Left

3Up

0
fAutoTextMarginBooleanUse host's margin calculationsFALSE
scaleTextLong IntegerText zoom/scale0
lTxidLong integerid for the text, value determined by the host0
fRotateTextBooleanRotate text with shapeFALSE
fSelectTextBooleanTRUE if single click selects text, FALSE if two clicksTRUE
fFitShapeToTextBooleanSize shape to fit text sizeFALSE
fFitTextToShapeBooleanSize text to fit shape sizeFALSE
WordArt Effect
gtextUNICODEStringUnicode text string.NULL
gtextAlign  Alignment on curve:

0Stretch each line of text to fit width

1Center text on width

2Left justify

3Right justify

4Spread letters out to fit width

5Spread words out to fit width

1
gtextSizeFixedDefault point size.2359296
gtextSpacingFixedAdjust the spacing between characters (1.0 is normal).65536
gtextFontStringFont name.NULL
fGtextBooleanTrue if the text effect properties (gtext*) are used.

False if these properties are ignored.

FALSE
gtextFVerticalBooleanIf an @ font is available use it; otherwise, rotate individual characters 90 degrees counter-clockwise.FALSE
gtextFKernBooleanIf the font supports character pair kerning, use it.FALSE
gtextFTightBooleanAdjust the spacing between characters rather than the character advance by the gtextSpacingratio.FALSE
gtextFStretchBooleanStretch the text to fit shape. FALSE
gtextFShrinkFitBooleanWhen laying out the characters, consider the glyph bounding box rather than the nominal font character bounds.FALSE
gtextFBestFitBooleanScale text laid out on a path to fit the path. FALSE
gtextFNormalizeBooleanStretch individual character heights independently to fit.FALSE
gtextFDxMeasureBooleanWhen laying out characters, measure distances along the x-axis rather than along the path.FALSE
gtextFBoldBooleanBold font (if available).FALSE
gtextFItalicBooleanItalic font (if available).FALSE
gtextFUnderlineBooleanUnderline font (if available).FALSE
gtextFShadowBooleanShadow font (if available).FALSE
gtextFSmallcapsBooleanSmall caps font (if available).FALSE
gtextFStrikethroughBooleanStrikethrough font (if available).FALSE
fGtextOKBooleanText effect (WordArt) supportedFALSE
gtextFReverseRowsBooleanReverse row orderFALSE
gtextRTFStringRTF text stringNULL
Picture
cropFromTopFixedTop cropping percentage. 0
cropFromBottomFixedBottom cropping percentage.0
cropFromLeftFixedLeft cropping percentage.0
cropFromRightFixedRight cropping percentage.0
pibPictureBinary picture data.NULL
pibNameStringPicture file name for link to file pictures.NULL
pibFlags  Flags for linked pictures:

0No links (default)

10Link to file; save with document

14Link to file; do not save picture with document

0
pictureTransparentColorTransparent color.0
pictureContrastFixedContrast setting.65536
PictureBrightnessFixedBrightness setting.0
pictureGammaFixedGamma correction setting.0
pictureGrayBooleanDisplay grayscale.0
pictureBiLevelBooleanDisplay bi-level.0
pibPrintPictureBlip to display when printingNULL
pibPrintFlags  Flags:

0No links (default)

10Link to file; save with document

14Link to file; do not save picture with document

0
pibPrintNameStringBlip file nameNULL
pictureActiveBooleanServer is active (OLE objects only)FALSE
pictureDblCrModColorModification used if shape has double shadowno change
pictureFillCrModColorModification for BW viewsundefined
pictureIdLong integerHost-defined ID for OLE objects (usually a pointer)0
pictureLineCrModColorModification for BW viewsundefined
Geometry
geoLeftLong integerLeft edge of the bounds of a user-drawn shape. 0
geoTopLong integerTop edge of the bounds of a user-drawn shape.0
geoRightLong integerRight edge of the bounds of a user-drawn shape.21600
geoBottomLong integerBottom edge of the bounds of a user-drawn shape.21600
pVerticiesArrayThe points of the shape.NULL
pSegmentInfoArrayThe segment information.NULL
pFragmentsArrayFragments are optional additional parts to the shape. They allow the shape contain multiple paths and parts. This property lists the fragments of the shapeNULL
pGuidesArrayGuide formulas—an array of elements that correspond to the Vector Markup Language (VML) <formulas> element, each array entry being a single <f> entry.NULL
pInscribeArrayThe inscribed rectangle definition.NULL
pAdjustHandlesArrayThe adjust handle definitions—an array of values corresponding to the VML <handles> element. NULL
adjustValueIntegerFirst adjust value from an adjust handle. The interpretation varies with the shape type. Adjust values alter the geometry of the shape in smart ways.0
adjust2ValueLong integerSecond adjust value.0
adjust3ValueLong integerThird adjust value.0
adjust4ValueLong integerFourth adjust value.0
adjust5ValueLong integerFifth adjust value.0
adjust6ValueLong integerSixth adjust value.0
adjust7ValueLong integerSeventh adjust value.0
adjust8ValueLong integerEighth adjust value.0
adjust9ValueLong integerNinth adjust value.0
adjust10ValueLong integerTenth adjust value.0
Grouped Shapes
fRelChangePageBooleanAnchor may change pageFALSE
fRelFlipHBooleanVertical flip for object inside a group, relative to its container and applied after the rotation.FALSE
fRelFlipVBooleanHorizontal flip for object inside a group, relative to its container and applied after the rotation.FALSE
groupBottomTwipsDefines the height of the group rectangle. Note that it does not necessarily indicate position on the page. The difference between groupBottom and groupTop should match the dimensions specified by \shptop and \shpbottom.20000
groupLeftTwipsDefines the width of the group rectangle. Note that it does not necessarily indicate position on the page. The difference between groupLeft and groupRight should match the dimensions specified by \shpleft and \shpright.0
groupRightTwipsDefines the width of the group rectangle. Note that it does not necessarily indicate position on the page. The difference between groupLeft and groupRight should match the dimensions specified by \shpleft and \shpright.20000
groupTopTwipsDefines the height of the group rectangle. Note that it does not necessarily indicate position on the page. The difference between groupBottom and groupTop should match the dimensions specified by \shptop and \shpbottom.0
relBottom.TwipsDefines the bottom of a shape within its parent shape (used for shapes in a group). The measurement is relative to the position of the parent group or drawing.1
relLeftTwipsDefines the left of a shape within its parent shape (used for shapes in a group). The measurement is relative to the position of the parent group or drawing.0
relRight.TwipsDefines the right of a shape within its parent shape (used for shapes in a group). The measurement is relative to the position of the parent group or drawing.1
relRotationFixedRepresents the information stored in the site of a shape that defines the size and location of the shape in the parent group or drawing. The coordinates are relative to the position of the parent group or drawing. The units are relative to the m_rcg of the parent.0
relTopTwipsDefines the top of a shape within its parent shape (used for shapes in a group). The measurement is relative to the position of the parent group or drawing.0
lidRegroupLong integerRegroup ID 0
Fill
fillTypeFill typeType of fill:

0A solid color

1A pattern (bitmap)

2A texture (pattern with its own color map)

3A picture centered in the shape

4Shade from start to end points

5Shade from bounding rectangle to end point

6Shade from shape outline to end point

7Shade using the fillAngle

0
fillColorColorForeground color.White
fillOpacityFixedOpacity.65536
fillBackColorColorBackground color.White
fillBackOpacityFixedOpacity for shades only.65536
fillBlipPicturePattern/texture picture for the fill.NULL
fillBlipNameStringPicture file name for custom fills.NULL
fillblipflags  Flags for fills:

0No links (default)

10Link to file; save with document

14Link to file; do not save picture with document

0
fillWidthEMUThe pattern or tile will be expanded to approximately this size. 0
fillHeightEMUThe pattern or tile will be expanded to approximately this size.0
fillAngleFixedFade angle number of degrees.0
fillFocus  Linear shaded fill focus percent. 0
fillToLeftFixedThe fillToLeft,  fillToTop, fillToRight, and fillToBottom values define the "focus" rectangle for concentric shapes; they are specified as a fraction of the outer rectangle of the shade.0
fillToTopFixedSee fillToLeft definition.0
fillToRightFixedSee fillToLeft definition.0
fillToBottomFixedSee fillToLeft definition.0
fillShadeColorsArrayCustom or preset color ramps for graduated fills on shapes. NULL
fillOriginXFixedWhen a textured fill is used, the texture may be aligned to with shape (fFillShape)—if this is done, the default alignment is to the top left. The values

FillOriginY

FillShapeOriginX

fillShapeOriginY

allow an arbitrary position in the texture (relative to the top-left proportion of the texture's height and width) to be aligned on an arbitrary position on the shape (relative to the top-left proportion of the width and height of the bounding box).

Note that all these values are fixed point fractions of the relevant width or height.

0
fillOriginYFixedSee fillOriginX definition.0
fillShapeOriginXFixedSee fillOriginX definition.0
fillShapeOriginYFixedSee fillOriginX definition.0
fFilledBooleanThe shape is filled.TRUE
fillCrModColorModification for BW viewsundefined
fillDztypeMeasurement typeMeasurement type:

0Default size, ignore the values

1Values are in EMUs

2Values are in pixels

3Values are fixed fractions of shape size

4Aspect ratio is fixed

5EMUs, fixed aspect ratio

6Pixels, fixed aspect ratio

7Proportion of shape, fixed aspect ratio

8Aspect ratio is fixed, favor larger size

9EMUs, fixed aspect ratio

10Pixels, fixed aspect ratio

11Proportion of shape, fixed aspect ratio

0
fillRectBottomEMUFor shaded fills, use the specified rectangle instead of the shape's bounding rect to define how large the fade is going to be.0
fillRectLeftEMUFor shaded fills, use the specified rectangle instead of the shape's bounding rect to define how large the fade is going to be.0
fillRectRightEMUFor shaded fills, use the specified rectangle instead of the shape's bounding rect to define how large the fade is going to be.0
fillRectTopEMUFor shaded fills, use the specified rectangle instead of the shape's bounding rect to define how large the fade is going to be.0
fillShadeColorsArrayPreset array of colorsNULL
fillShadePresetLong integerSpecial shades0
fillShadeTypeShade TypeType of shading, if a shaded (gradient) fill.Default
fillShapeBooleanRegister pattern on shapeTRUE
fillUseRectBooleanUse the large rectangleFALSE
fillWidthEMUHow big to make a metafile texture.0
fFillOKBooleanOK to fill the shape through the UI or VBA?TRUE
fFillShadeShapeOKBooleanIf true a concentric shade (repeatedly drawing the shape at decreasing size) is permitted for this path, if not then it is not (normally because the repeated drawing will overwrite the shape boundary.)FALSE
Line
lineColorColorColor of the line.Black
lineBackColorColorBackground color of the pattern.White
lineTypeLine typeType of line:

0Solid fill with the line color

1Patterned fill with the lineFillBlip

2Textured fill with the lineFillBlip

3Picture fill with the lineFillBlip

0
lineFillBlipPicturePattern for the line.NULL
lineFillBlipFlags Flags for patterned lines:

0No links (default)

10Link to file; save with document

14Link to file; do not save picture with document

0
lineFillWidthEMUWidth of the pattern0
lineFillHeightEMUHeight of the pattern0
lineWidthEMULine width9525 (0.75pt)
lineStyleLine StyleLine style:

0Single line (of width lineWidth)

1Double lines of equal width

2Double lines, one thick, one thin

3Double lines, reverse order

4Three lines, thin, thick, thin

0
lineDashingDash StyleDashing:

0Solid

1Dash (Windows)

2Dot (Windows)

3Dash dot (Windows)

4Dash dot dot (Windows)

6Dot

7Dash

8Long dash

9Dash dot

10Long dash dot

11Long dash dot dot

0
lineStartArrowheadArrow TypeStart arrow type:

0Nothing

1Arrow

2Stealth arrow

3Diamond

4Oval

6Open arrow

7Chevron arrow

8Double chevron arrow

0
lineEndArrowheadArrow TypeEnd arrow type (same values as for lineStartArrowhead).0
lineStartArrowWidthArrow WidthStart arrow width:

0Narrow

1Medium

2Wide

1
lineStartArrowLengthArrow LengthStart arrow length:

0Short

1Medium

2Long

1
lineEndArrowWidthArrow WidthEnd arrow width (same values as for lineStartArrowWidth).1
lineEndArrowLengthArrow LengthEnd arrow length (same values as for lineStartArrowLength).1
fLineBooleanHas a line.TRUE
lineBackColorColorBackground colorwhite
lineCrModColorModification for BW viewsundefined
lineDashStyleArrayLine dash styleNULL
lineEndCapStyleLine Cap StyleLine Cap Style for shape:

0Round

1Square

2Flat

2
lineFillBlipNameStringBlip file nameNULL
lineFillDztypeMeasurement typeHow to interpret fillWidth/Height numbers:

0Default size, ignore the values

1Values are in EMUs

2Values are in pixels

3Values are fixed fractions of shape size

4Aspect ratio is fixed

5EMUs, fixed aspect ratio

6Pixels, fixed aspect ratio

7Proportion of shape, fixed aspect ratio

8Aspect ratio is fixed, favor larger size

9EMUs, fixed aspect ratio

10Pixels, fixed aspect ratio

11Proportion of shape, fixed aspect ratio

0
lineFillHeightEMUHow big to make a metafile texture.0
lineJoinStyleLine join styleLine join style for shape:

0Join edges by a straight line

1Extend edges until they join

2Draw an arc between the two edges

2
lineMiterLimitfixedRatio of width524288
fLineOKBooleanLine style may be setTRUE
Shadow
shadowType Type of shadow:

0Offset shadow

1Double offset shadow

2Rich perspective shadow (cast relative to shape)

3Rich perspective shadow (cast in shape space)

4Perspective shadow cast in drawing space

6Emboss or engrave

0
shadowColorColorForeground color.RGB(128,128,128)
shadowHighlightColorEmbossed color.RGB(203,203,203)
shadowOpacityFixedOpacity of the shadow.65536
shadowOffsetXEMUShadow offset toward the right.0
shadowOffsetYEMUShadow offset toward the bottom.0
shadowSecondOffsetXEMUDouble shadow offset toward the right.25400
shadowSecondOffsetYEMUDouble shadow offset toward the bottom.25400
shadowScaleXToXFixedThe shadowScaleXToX to shadowWeight define a 3x2 transform matrix that is applied to the shape to generate the shadow.65536
shadowScaleYToXFixedSee definition for shadowScaleXToX.0
shadowScaleXToYFixedSee definition for shadowScaleXToX.0
shadowScaleYToYFixedSee definition for shadowScaleXToX.65536
shadowPerspectiveXFixedSee definition for shadowScaleXToX.0
shadowPerspectiveYFixedSee definition for shadowScaleXToX.0
shadowWeightFixedSee definition for shadowScaleXToX.32768
shadowOriginXFixedDefine the position of the origin relative to the center of the shape— this position is determined based on a proportion of the rotated shape width and height. The shape will be rotated and then positioned such that the point is at (0,0) before the transformation is applied. 0
ShadowOriginYFixedSee the definition for shadowOriginX.0
fShadowBooleanSwitches the shadow on or off.FALSE
shadowCrModColorModification for BW viewsundefined
fshadowObscuredBooleanExcel5-style shadowFALSE
fShadowOKBooleanShadow may be setTRUE
3-D Effects
c3DSpecularAmtFixedSpecular amount for the material. 0
c3DDiffuseAmtFixedDiffusion amount for the material. 65536
c3DShininessLong integerShininess of the material.5
c3DEdgeThicknessEMUSpecular edge thickness.12700
c3DExtrudeForwardEMUExtrusion amount forward.0
c3DExtrudeBackwardEMUExtrusion amount backward.457200
c3DExtrusionColorColorColor of the extrusion. 
f3DBooleanTrue if shape has a three-dimensional (3D) effect, False if it does not.FALSE
fc3DMetallicBooleanTrue if shape uses metallic specularity, False if it does not.FALSE
fc3DUseExtrusionColorBooleanExtrusion color is set explicitly. FALSE
fc3DLightFaceBooleanLight the face of the shape.TRUE
c3DYRotationAngleAngleDegrees about y-axis.

If fc3DconstrainRotation (a Boolean property that defaults to True) is True the rotation is restricted to x-y rotation and the final rotation results from first rotating by c3DYRotationAngle degrees about the y-axis and then by c3DXRotationAngle degrees about the z-axis.

If fc3DconstrainRotation is False, the final rotation results from a single rotation of c3DrotationAngle about the axis specified by c3DrotationAxisX, c3DrotationAxisY, and c3DrotationAxisZ.

0
c3DXRotationAngleAngleDegrees about x-axis.0
c3DRotationAxisXLong integerThese specify the rotation axis. Only their relative magnitudes matter.100
c3DRotationAxisYLong integerSee the c3DYRotationAxisX definition.0
c3DRotationAxisZLong integerSee the c3DYRotationAxisX definition.0
c3DRotationAngleAngleThe rotation about the axis (defined above in the c3DRotationAxisX, Y, and Z parameter sections)0
fC3DRotationCenterAutoBooleanIf fC3DRotationCenterAuto is True the rotation will be about the center of the 3-D bounding cube of the 3-D group; otherwise, the rotation center will be about c3DRotationCenterX, c3DRotationCenterY, and c3DRotationCenterZ.FALSE
c3DRotationCenterXFixedRotation center (X).

The X and Y values are a 16.16 fraction of the geometry width and height, with (0,0) being at the center of the geometry. The Z value must be in absolute units (EMUs).

0
c3DRotationCenterYFixedRotation center (Y).

If fC3DRotationCenterAuto is True the rotation will be about the center of the 3-D bounding cube of the 3-D group; otherwise, the rotation center will be about c3DRotationCenterX, c3DRotationCenterY, and c3DRotationCenterZ.

The X values and Y values are a fraction of the geometry width and height, with (0,0) being at the center of the geometry. The Z value is in absolute units.

0
c3DRotationCenterZEMUSee c3DRotationCenterY above.0
c3DRenderModeLong Integer0Render with full detail

1Render as a wire frame

2Render a bounding cube

 
c3DXViewpointEMUX view point.1250000
c3DYViewpointEMUY view point. -1250000
c3DZViewpointEMUZ view distance.9000000
c3DOriginXFixedThe following c3DOriginY and c3DSkewAngle values define the origin relative to which the viewpoint origin is measured.

These values are 16.16 numbers that specify the position of the origin within the shape bounding box as multiples of the width and height of that bounding box and relative to the center (that is, they are displaced from the center). When these values are applied, the actual transformed shape path is used rather than the shape geometry (compare with the shadow and perspective values, which necessarily work on the geometry bounding box—not the actual points). This means that a shape that extends outside the geometry bounding box (such as a text effect) is handled "correctly" for the calculation of the 3-D origin.

32768
c3DOriginYFixedSee the definition for c3DOriginX.-32768
c3DSkewAngleFixedSkew angle.-8847360
c3DSkewAmountLong integerPercentage skew amount.50
c3DAmbientIntensityFixedAmbient intensity should be low (0 to .1) to avoid washed out appearance. 20000
c3DKeyXLong integerKey light source direction. Values may be any number; only their relative magnitudes matter. 50000
c3DKeyYLong integerSee c3DKeyX definition above.0
c3DKeyZLong integerSee c3DKeyX definition above.10000
c3DKeyIntensityFixedFixed point intensity. Theoretical maximum is 1, but can be higher.38000
c3DFillXLong integerFill light source direction; only their relative magnitudes matter. This direction defines a second light source arbitrarily called the "fill light." Generally this will be positioned 90-180 degrees away from the key light and very roughly in front of the scene to fill in any harsh shadows. This fill will be dim compared to the first light source. Theoretically, it should be non-harsh, but harsh fill lighting looks better sometimes.-50000
c3DFillYLong integerSee c3DfillX definition.0
c3DFillZLong integerSee c3DfillX definition.10000
c3DFillIntensityFixedTheoretical maximum is 1, but can be higher.38000
fc3DParallelBooleanTrue if the fill has parallel projection, False if it does not. If fc3DParallel is True, the fc3DKeyHarsh and fc3DFillHarsh properties determine the parallel projection used. A skew amount of 0 means the projection is orthographic.TRUE
fc3DKeyHarshBooleanTrue if key lighting is harsh, False if it is not.TRUE
fc3DFillHarshBooleanTrue if fill lighting harsh, False if it is not.FALSE
c3DCrModColorModification for BW viewsundefined
c3DToleranceFixed3D tolerance30000
f3DOKBoolean3D may be setTRUE
fc3DConstrainRotationBooleanIf True the rotation is restricted to x-y rotation and the final rotation results from first rotating by c3DYRotation degrees about the y-axis and then by c3DXRotation degrees about the z-axis. If not then the final rotation results from a single rotation of c3DRotationAngle about the axis specified by c3DRotationAxisX,Y,andZ.TRUE
Perspective
perspectiveOffsetXFixedThe values define a transformation matrix. Each value is scaled by the perspectiveWeight parameter.0
perspectiveOffsetYFixedThe values define a transformation matrix. Each value is scaled by the perspectiveWeight parameter.0
perspectiveOriginXFixedPerspective x origin32768
perspectiveOriginYFixedPerspective y origin32768
perspectivePerspectiveXFixedThe values define a transformation matrix. Each value is scaled by the perspectiveWeight parameter.0
perspectivePerspectiveYFixedThe values define a transformation matrix. Each value is scaled by the perspectiveWeight parameter.0
perspectiveScaleXToXFixedThe values define a transformation matrix. Each value is scaled by the perspectiveWeight parameter.65536
perspectiveScaleXToYFixedThe values define a transformation matrix. Each value is scaled by the perspectiveWeight parameter.0
perspectiveScaleYToXFixedThe values define a transformation matrix. Each value is scaled by the perspectiveWeight parameter.0
perspectiveScaleYToYFixedThe values define a transformation matrix. Each value is scaled by the perspectiveWeight parameter.65536
perspectiveTypeTransform TypeWhere transform applies:

0Absolute

1Shape

2Drawing

1
perspectiveWeightFixedScaling factor256
fPerspectiveBooleanOn/off  
Callout
spcot  Callout type:

1Right angle

2One segment

3Two segments

4Three segments

3
dxyCalloutGapEMUDistance from box to first point.76200
spcoa  Callout angle:

1Any angle

230 degrees

343 degrees

460 degrees

590 degrees

1
spcod  Callout drop type:

0Top

1Center

2Bottom

3Specified by dxyCalloutDropSpecified

3
dxyCalloutDropSpecifiedEMUIf spcod is 3, then this holds the actual drop distance.114300
dxyCalloutLengthSpecifiedEMUIn the case where fCalloutLengthSpecified is True, this holds the actual distance.0
fCalloutBooleanThis is a callout.FALSE
fCalloutAccentBarBooleanCallout has an accent bar.FALSE
fCalloutTextBorderBooleanCallout has a text border.TRUE
fCalloutDropAutoBooleanTrue if Auto attach is on. False if it is off. If this is True, then the converter should occasionally invert the drop distance.FALSE
fCalloutLengthSpecifiedBooleanTrue if the callout length is specified; False if it is not. If True, use dxyCalloutLengthSpecified. If False, the Best Fit option is on.FALSE
fCalloutMinusXBooleanThe polyline of the callout is to the rightFALSE
fCalloutMinusYBooleanThe polyline of the callout is down.FALSE
fCalloutTextBorderBooleanCallout has a text borderTRUE
Connectors
cxkConnection Site TypeConnection Site Type:

0None

1Segments

2Custom

3Rect

1
cxstyleConnector StyleConnector Style:

0Straight

1Bent

2Curved

3None

3
Black and White Modes
bWModeBlack and White ModeSettings for modifications to be made when in different forms of black-and-white mode:

0Color

1Automatic

2Grayscale

3Light Grayscale

4Inverse Gray

5Gray Outline

6Black TextLine

7High Contrast

8Black

9White

10Don't Show

11Number of Black and White Modes

1
bWModeBWBlack and White ModeSettings for modifications to be made when in different forms of black-and-white mode:

0Color

1Automatic

2Grayscale

3Light Grayscale

4Inverse Gray

5Gray Outline

6Black TextLine

7High Contrast

8Black

9White

10Don't Show

11Number of Black and White Modes

1
bWModePureBWBlack and White ModeSettings for modifications to be made when in different forms of black-and-white mode:

0Color

1Automatic

2Grayscale

3Light Grayscale

4Inverse Gray

5Gray Outline

6Black TextLine

7High Contrast

8Black

9White

10Don't Show

11Number of Black and White Modes

1

The format of the value depends on the property name it is paired with. Many values are simple single numbers. Distances are expressed in EMU units. There are 12700 EMU units in a point hence 914400 in an inch and 360000cm-1. Fractional or fixed values are expressed using units that are 1/65536th of a whole. Angles are expressed as fractions of a degree. Colors are 24 bit color values. Booleans have two possible values: 1 for True and 0 for False.

Arrays are formatted as a sequence of number separated by semicolons. The first number tells the size of each element in the array in bytes. The number of bytes per element may be 2, 4, or 8. When the size of the element is 8, each element is represented as a group of two numbers. The second number tells the number of elements in the array. For example, the points of a square polygon are written as:

{sv 8;4;{0,0};{100,0};{100,100};{0,100}}

The ShapeType property can have the following possible values:

Value Description
0 Freeform or non-autoshape
1 Rectangle
2 Round rectangle
3 Ellipse
4 Diamond
5 Isosceles triangle
6 Right triangle
7 Parallelogram
8 Trapezoid
9 Hexagon
10 Octagon
11 Plus Sign
12 Star
13 Arrow
14 Thick arrow
15 Home plate
16 Cube
17 Balloon
18 Seal
19 Arc
20 Line
21 Plaque
22 Can
23 Donut
24 Text simple
25 Text octagon
26 Text hexagon
27 Text curve
28 Text wave
29 Text ring
30 Text on curve
31 Text on ring
41 Callout 1
42 Callout 2
43 Callout 3
44 Accent Callout 1
45 Accent Callout 2
46 Accent Callout 3
47 Border Callout 1
48 Border Callout 2
49 Border Callout 3
50 Accent Border Callout 1
51 Accent Border Callout 2
52 Accent Border Callout 3
53 Ribbon
54 Ribbon2
55 Chevron
56 Pentagon
57 No Smoking
58 Seal8
59 Seal16
60 Seal32
61 Wedge Rect Callout
62 Wedge RRect Callout
63 Wedge Ellipse Callout
64 Wave
65 Folded Corner
66 Left Arrow
67 Down Arrow
68 Up Arrow
69 Left Right Arrow
70 Up Down Arrow
71 IrregularSeal1
72 IrregularSeal2
73 Lightning Bolt
74 Heart
75 Picture Frame
76 Quad Arrow
77 Left Arrow Callout
78 Right Arrow Callout
79 Up Arrow Callout
80 Down Arrow Callout
81 Left Right Arrow Callout
82 Up Down Arrow Callout
83 Quad Arrow Callout
84 Bevel
85 Left Bracket
86 Right Bracket
87 Left Brace
88 Right Brace
89 Left Up Arrow
90 Bent Up Arrow
91 Bent Arrow
92 Seal24
93 Striped Right Arrow
94 Notched Right Arrow
95 Block Arc
96 Smiley Face
97 Vertical Scroll
98 Horizontal Scroll
99 Circular Arrow
100 Notched Circular Arrow
101 Uturn Arrow
102 Curved Right Arrow
103 Curved Left Arrow
104 Curved Up Arrow
105 Curved Down Arrow
106 Cloud Callout
107 Ellipse Ribbon
108 Ellipse Ribbon 2
109 Flow Chart Process
110 Flow Chart Decision
111 Flow Chart Input Output
112 Flow Chart Predefined Process
113 Flow Chart Internal Storage
114 Flow Chart Document
115 Flow Chart Multidocument
116 Flow Chart Terminator
117 Flow Chart Preparation
118 Flow Chart Manual Input
119 Flow Chart Manual Operation
120 Flow Chart Connector
121 Flow Chart Punched Card
122 Flow Chart Punched Tape
123 Flow Chart Summing Junction
124 Flow Chart Or
125 Flow Chart Collate
126 Flow Chart Sort
127 Flow Chart extract
128 Flow Chart Merge
129 Flow Chart Offline Storage
130 Flow Chart Online Storage
131 Flow Chart Magnetic Tape
132 Flow Chart Magnetic Disk
133 Flow Chart Magnetic Drum
134 Flow Chart Display
135 Flow Chart Delay
136 Text Plain Text
137 Text Stop
138 Text Triangle
139 Text Triangle Inverted
140 Text Chevron
141 Text Chevron Inverted
142 Text Ring Inside
143 Text Ring Outside
144 Text Arch Up Curve
145 Text Arch Down Curve
146 Text Circle Curve
147 Text Button Curve
148 Text Arch Up Pour
149 Text Arch Down Pour
150 Text Circle Pour
151 Text Button Pour
152 Text Curve Up
153 Text Curve Down
154 Text Cascade Up
155 Text Cascade Down
156 Text Wave1
157 Text Wave2
158 Text Wave3
159 Text Wave4
160 Text Inflate
161 Text Deflate
162 Text Inflate Bottom
163 Text Deflate Bottom
164 Text Inflate Top
165 Text Deflate Top
166 Text Deflate Inflate
167 Text Deflate Inflate Deflate
168 Text Fade Right
169 Text Fade Left
170 Text Fade Up
171 Text Fade Down
172 Text Slant Up
173 Text Slant Down
174 Text Can Up
175 Text Can Down
176 Flow Chart Alternate Process
177 Flow Chart Off-Page Connector
178 Callout 90
179 Accent Callout 90
180 Border Callout 90
181 Accent Border Callout 90
182 Left Right Up Arrow
183 Sun
184 Moon
185 Bracket Pair
186 Brace Pair
187 Seal4
188 Double Wave
201 Host Control
202 Text Box

The following keywords are related to defining a hyperlink hanging off of a shape (that is, all of them are inside of a {\sp {\sn … } {\sp …}}). These specifically can occur in the \sp to define a property that is a hyperlink. They are used like this:

{ \hl  { \hlloc  RTF-string } { \hlsrc RTF-string } { \hlfr RTF-string } }

The three groups can be in any order. These provide the three strings needed to describe a hyperlink fully.

Control
Word
Meaning
Hyperlink Property for Shapes
\hllocLocation string for hyperlink.
\hlsrcSource string for hyperlink.
\hlfrFriendly name for hyperlink.

For more complete information please refer to the Microsoft Draw Binary Format Specification.

Footnotes

The \footnote control word introduces a footnote. Footnotes are destinations in RTF. A footnote is anchored to the character that immediately precedes the footnote destination (that is, the footnote moves with the character to which it is anchored). If automatic footnote numbering is defined, the destination can be preceded by a footnote reference character, identified by the control word \chftn. No Microsoft product supports footnotes within headers, footers, or comments (annotations). Placing a footnote within headers, footers, or comments (annotations) will often result in a corrupted document.

Footnotes have the following syntax.

<foot> '{' \footnote <para>+ '}'

Here is an example of a destination containing footnotes:

\ftnbj\ftnrestart \sectd \linemod0\linex0\endnhere \pard\plain
\ri1170 \fs20 {\pu6 Mead's landmark study has been amply annotated.\chftn
{\footnote \pard\plain \s246 \fs20 {\up6\chftn }See Sahlins, Bateson, and 
Geertz for a complete bibliography.}
It was her work in America during the Second World War, however, that forms
the basis for the paper. As others have noted, \chftn
{\footnote \pard\plain \s246 \fs20 {\up6\chftn}
A complete bibliography will be found at the end of this chapter.}
this period was a turning point for Margaret Mead.}
\par

To indicate endnotes, the following combination is emitted: \footnote\ftnalt. Existing readers will ignore the \ftnalt control word and treat everything as a footnote.

For other control words relating to footnotes, see the sections titled Document Formatting Properties, Section Formatting Properties, and Special Characters in this RTF Specification.

Comments (Annotations)

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

Fields

The \field control word introduces a field destination that contains the text of fields. Fields have the following syntax:

<field> '{' \field <fieldmod>? <fieldinst> <fieldrslt> '}'
<fieldmod> \flddirty? & \fldedit? & \fldlock? & \fldpriv?
<fieldinst> '{\*' \fldinst <para>+ <fldalt>? '}'
<fldalt> \fldalt
<fieldrslt> '{' \fldrslt <para>+ '}'

Several control words alter the interpretation of the field. These control words are listed in the following table.

Control
Word
Meaning
\flddirty A formatting change has been made to the field result since the field was last updated.
\fldedit Text has been added to, or removed from, the field result since the field was last updated.
\fldlock Field is locked and cannot be updated.
\fldpriv Result is not in a form suitable for display (for example, binary data used by fields whose result is a picture).

Two subdestinations are required within the \field destination. They must be enclosed in braces ({ }) and begin with the following control words.

Control
Word
Meaning
\fldinst Field instructions. This is a destination control word.
\fldrslt Most recent calculated result of the field. This is a destination control word.

If the instruction for a field contains a file name, then the \cpg control can be used to define the character set of the file name. See Code Page Support in this RTF Specification for details.

The \fldrslt control word should be included even if no result has been calculated because most readers (even those readers that do not recognize fields) can generally include the value of the \fldrslt destination in the document. A field result should not start with a table, because this will break some RTF readers.

An example of some field text follows:

{\field {\*\fldinst AUTHOR \\*MERGEFORMAT   }{\fldrslt Joe Smith}}\par\pard
{\field{\*\fldinst time \\@ "h:mm AM/PM"}{\fldrslt 8:12 AM}}

You can use the \fldalt control word to specify that the given field reference is to an endnote. For example, the following field in RTF is a reference to a footnote

{\field{\*\fldinst NOTEREF _RefNumber } {\fldrslt 1}}

The following is an example of a reference to an endnote

{\field{\*\fldinst NOTEREF _RefNumber \fldalt } {\fldrslt I}}

If the specified field is a form field, the \*\datafield destination appears as a part of <char> and contains the binary data of a form field instruction. For example:

{\field{\*\fldinst {\*\bkmkstart Text1} FORMTEXT {{\*\datafield 
00000000000000000554657874310008476565207768697a0000000000000000000000}}}{\fldrslt Default 
Result}}{\*\bkmkend Text1}

Note

   

The \datafield destination requires the \* prefix. The \fldtype, \date, \time, and \wpeqn field keywords should be ignored.

Form Fields

Control
Word
Meaning
\formfield Group destination keyword indicating start of form field data.
\fftypeN Form field type:

0Text

1Check box

2List

\ffownhelpN 1 if there is associated Help text (defined under \ffhelptext), 0 otherwise.
\ffownstatN 1 if there is associated status line text (defined under \ffstattext), 0 otherwise.
\ffprotN 1 if this field is protected, 0 otherwise.
\ffsizeN Type of size selected for check box field:

0Auto

1Exact

\fftypetxtN Type of text field:

0Regular text

1Number

2Date

3 Current date

4Current time

5Calculation

\ffrecalcN 1 if the field should be calculated on exit, 0 otherwise.
\ffhaslistboxN 1 if this field has list box attached to it, 0 otherwise.
\ffmaxlen Number of characters for text field.
\ffhpsN Check box size (half-point sizes).
\ffname Form field name (string). This is a destination control word.
\ffdeftext Default text for text field (string). This is a destination control word.
\ffdefres Default entry for list field (for example 0 = first list item, 1 = second list item).
\ffformat Format for text field (string). This is a destination control word.
\ffhelptext Help text (string). This is a destination control word.
\ffstattext Status line text (string). This is a destination control word.
\ffentrymcr Macro to be executed upon entry into this form field (string). This is a destination control word.
\ffexitmcr Macro to be executed upon exit from this form field (string). This is a destination control word.
\ffl List of text for list field. This is a destination control word.
\ffresN Result field for a form field. Values from 0 to N-1, where N is the number of \ffl entries.

Index Entries

The \xe control word introduces an index entry. Index entries in RTF are destinations. An index entry has the following syntax:

<idx> '{' \xe (\xef? & \bxe? & \ixe?) <entry> (<txe> | <rxe>)? '}'
<entry> (<char>+ <yxe>?) | ('{' <char>+ <yxe>? '}')
<yxe> \yxe <char>+ #PCDATA
<txe> '{' \txe <char>+ #PCDATA'}'
<rxe> '{' \rxe #PCDATA '}'

If the text of the index entry is not formatted as hidden text with the \v control word, the text is put into the document as well as into the index. For more information on the \v control word, see Font (Character) Formatting Properties in this RTF Specification. Similarly, the text of the \txe subdestination, described later in this section, becomes part of the document if it is not formatted as hidden text.

The following control words may also be used.

Control
Word
Meaning
\xefN Allows multiple indexes within the same document. N is an integer that corresponds to the ASCII value of a letter between A and Z.
\bxe Formats the page number or cross-reference in bold.
\ixe Formats the page number or cross-reference in italic.
\txe Text Text argument to be used instead of a page number. This is a destination control word.
\rxe BookmarkName Text argument is a bookmark for the range of page numbers. This is a destination control word.
\yxe Pronunciation (or heading) for index entry, used in phonetic sorting.
\*\pxe "Yomi" (pronunciation) for index entry.

Table of Contents Entries

The \tc control word introduces a table of contents entry that can be used to build the actual table of contents. The \tcn control word marks a table of contents entry that will not have a page number associated with it; this is used in place of \tc for such entries. Table of contents entries are destinations, and they have the following syntax:

<toc> '{' \tc | \tcn (\tcf? & \tcl?) <char>+ '}'

As with index entries, text that is not formatted as hidden with the \v character-formatting control word is put into the document. The following control words can also be used in this destination.

Control
Word
Meaning
\tcfN Type of table being compiled. N is mapped by existing Microsoft software to a letter between A and Z (the default is 67, which maps to C, used for tables of contents).
\tclN Level number (the default is 1).

Bidirectional Language Support

RTF supports bidirectional writing orders for languages such as Arabic. The controls are described below (as well as in the appropriate sections throughout this RTF Specification). Also refer to the associated character properties defined in Associated Character Properties in this RTF Specification.

All the control words relating to bidirectional language support are repeated here for convenience.

Control
Word
Meaning
\rtlch The character data following this control word will be treated as a right-to-left run.
\ltrch The character data following this control word will be treated as a left-to-right run (the default).
\linN Left indent for left-to-right paragraphs; right indent for right-to-left paragraphs (the default is 0).
\rinN Right indent for left-to-right paragraphs; left indent for right-to-left paragraphs (the default is 0).
\pgnbidia Page-number format is Abjad Jawaz if language is Arabic and Biblical Standard if language is Hebrew.
\pgnbidib Page-number format is Alif Ba Tah if language is Arabic and Non-standard Decimal if language is Hebrew.
\pnbidia Abjad Jawaz if language is Arabic and Biblical Standard if language is Hebrew.
\pnbidib Alif Ba Tah if language is Arabic and Non-standard Decimal if language is Hebrew.
\rtlmark The following characters should be displayed from right to left.
\ltrmark The following characters should be displayed from left to right.
\rtlpar Text in this paragraph will be displayed with right-to-left precedence
\ltrpar Text in this paragraph will be displayed with left-to-right precedence (the default).
\rtlrow Cells in this table row will have right-to-left precedence.
\ltrrow Cells in this table row will have left-to-right precedence (the default).
\rtlsect This section will thread columns from right to left.
\ltrsect This section will thread columns from left to right (the default).
\rtldoc Text in this document will be displayed from right to left unless overridden by a more specific control.
\ltrdoc Text in this document will be displayed from left to right unless overridden by a more specific control (the default).
\levelnfcnN Same as \levelnfc.  Takes priority over it if both are present.
\leveljcnN 0Left justified if for left-to-right paragraphs and right justified for right-to-left paragraphs

1Center justified

2Right justified if for left-to-right paragraphs and left justified for right-to-left paragraphs

Takes priority over \leveljc if both are present

\rtlgutter Gutter is positioned on the right
\taprtl Indicates that the table direction is right-to-left
\zwj Zero-width joiner. This is used for ligating characters.
\zwnj Zero-width nonjoiner. This is used for unligating characters.