Description of the changes to the Rich Text Format (RTF) Specification, version 1.8 for Word

Article translations Article translations
Article ID: 922681 - View products that this article applies to.
Expand all | Collapse all

On This Page

INTRODUCTION

This article describes the keyword changes to the Rich Text Format (RTF) Specification, version 1.8 for Microsoft Word.

The changes described in this article are included in security bulletin 917336. However, these changes are not related to the security bulletin. For more information about security bulletin 917336, click the following article number to view the article in the Microsoft Knowledge Base:
917336 MS06-027: Vulnerability in Microsoft Word could allow remote code execution

MORE INFORMATION

In the RTF Specification, version 1.8, some keywords are newly added, and some keywords are now used differently. The following sections describe these keywords.

Headers and footers

In earlier versions of the RTF Specification, only the \footer keyword or the \header keyword was written if the "Facing pages" option was disabled. Additionally, only the \headerl and \headerr keywords for the left and right headers, respectively, were written if the "Facing pages" option was enabled.

Because of the changes to the RTF Specification, the \headerl keyword and the \headerr keyword are always written. Additionally, the \headerr keyword is written as the header on every page if the "Facing pages" option is disabled.

Mail merge

Mail merge refers to an operation by which RTF documents work together with data from an external data source, importing the data into a document according to a set of codes that are contained in RTF tags that are also known as fields (\field).

An RTF document that contains the \*\mailmerge control word is connected to an external data source. This document is known as a source document. In addition to being connected to an external data source and containing fields, a source document may contain any regular RTF constructs. These include the following:
  • Character text
  • Paragraphs
  • Images
  • Tables
  • Lists
The two key parts of the mail merge data that are stored in a RTF document:
  • The information that connects the document to the external data source
  • The information that populates the fields in the document with external data
Once the fields in a mail merge document have been populated with external data, the mail merge process is complete. The resulting files are known as mail merged documents or simply merged documents.

The following table lists the keywords that are already documented in the RTF Specification for mail merge documents.
Collapse this tableExpand this table
KeywordUsage
<mailmerge>{ \*\mailmerge <mmmaintype> \mmlinktoquery? <mmdatatype> \mmdefaultsql? <mmconnectstrdata>? <mmquery>? <mmdatasource>? \mmblanklinks? <mmheadersource> <mmdest> <mmaddfieldname>? <mmmailsubject>? \mmattach? \mmshowdata? \mmreccurN \mmerrorsN <mmodso>* \mmodsocoldelimN \mmjdsotypeN \mmodsofhdrN <mmodsorecipdata>+
<mmmaintype>\mmmaintypecatalog | \mmmaintypeenvelopes | \mmmaintypelabels | \mmmaintypeletters | \mmmaintypeemail | \mmmaintypefax
<mmdatatype>\mmdatatypeaccess | \mmdatatypeexcel | \mmdatatypeqt | \mmdatatypeodbc | \mmdatatypeodso | \mmdatatypefile
<mmconnectstrdat>'{'\mmconnectstrdat #SDATA'}'
<mmquery>‘{ ‘\mmquery #PCDATA'}'
<mmdatasource>‘{ ‘\mmdatasource #PCDATA'}'
<mmheadersource>‘{ ‘\mmheadersource #PCDATA' }'
<mmdest>\mmdestnewdoc | \mmdestprinter | \mmdestemail | \mmdestfax
<mmaddfieldname>‘{'\mmaddfieldname #PCDATA'}'
<mmmailsubject>'{\mmmailsubject #PCDATA'}'
<mmodso>'{\*'\mmodso <mmodsoudldata>? <mmodsotable>? <mmodsosrc>? <mmodsofilter>? <mmodsosort>? <fldmpdata>?'}'
<mmodsoudldata>'{'\mmodsoudldata #SDATA'}'
<mmodsotable>'{'\mmodsotable #PCDATA' }'
<mmodsosrc>'{'\mmodsosrc #PCDATA' }'
<mmodsofilter>'{'\mmodsofilter #SDATA'}'
<mmodsosort>'{'\mmodsofilter #SDATA'}'
<fldmpdata>'{'<mmfttype>? <mmodsoname>? <mmodsomappedname>? \mmodsofmcolumnN \mmodsodynaddrN \mmodsosolitN'}'
<mmfttype>\mmfttypenull | \mmfttypedbcolumn | \mmfttypeaddress | \mmfttypesalutation | \mmfttypemapped | \mmfttypebarcode
<mmodsoname>'{'\mmodsoname #PCDATA' }'
<mmodsomappedname>'{'\mmodsomappedname #PCDATA' }'
<mmodsorecipdata>'{\*'\mmodsorecipdata \mmodsoactiveN <uniqueid>'}'
<uniqueid>'{'\mmodsohashN | \mmodsocolumnN & <mmodsouniquetag>'}'
<mmodsouniquetag>'{'\mmodsouniquetag #PCDATA' }'
For example, consider the mail merge scenario in which an RTF document is connected to an external data source that is named "ExampleExternalDataSource.xls" and that is located on the user's desktop.
{\*\mailmerge\mmmaintypeletters\mmlinktoquery\mmdatatypeodso{\*\mmconnectstrdata #SDATA}

{\mmquery SELECT * FROM `Sheet1$`}{\mmdatasource C:\\Documents and Settings\\Desktop\\ExampleExternalDataSource.xls}
\mmdestnewdoc\mmreccur1\mmerrors2{\*\mmodso{\*\mmodsoudldata #SDATA}

{\mmodsotable Sheet1$}{\mmodsosrc C:\\Documents and Settings\\Desktop\\ExampleExternalDataSource.xls}
{\*\mmodsofilter }{\*\mmodsosort }{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}
{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname Title}

{\mmodsomappedname Courtesy Title}\mmodsofmcolumn0\mmodsolid1033}{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname First Name}
{\mmodsomappedname First Name}\mmodsofmcolumn1\mmodsolid1033}{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}

{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname Last Name}{\mmodsomappedname Last Name}\mmodsofmcolumn2\mmodsolid1033}
{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}

{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname Company Name}
{\mmodsomappedname Company}\mmodsofmcolumn3\mmodsolid1033}{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname Address Line 1}
{\mmodsomappedname Address 1}\mmodsofmcolumn4\mmodsolid1033}{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname Address Line 2}
{\mmodsomappedname Address 2}\mmodsofmcolumn5\mmodsolid1033}{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname City}{\mmodsomappedname City}

\mmodsofmcolumn6\mmodsolid1033}{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname State}{\mmodsomappedname State}\mmodsofmcolumn7\mmodsolid1033}
{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname ZIP Code}{\mmodsomappedname Postal Code}

\mmodsofmcolumn8\mmodsolid1033}{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname Country}
{\mmodsomappedname Country or Region}\mmodsofmcolumn9\mmodsolid1033}
{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname Work Phone}{\mmodsomappedname Business Phone}

\mmodsofmcolumn11\mmodsolid1033}{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}
{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname Home Phone}
{\mmodsomappedname Home Phone}\mmodsofmcolumn10\mmodsolid1033}

{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}{\*\mmodsofldmpdata\mmfttypedbcolumn{\mmodsoname E-mail Address}
{\mmodsomappedname E-mail Address}\mmodsofmcolumn12\mmodsolid1033}{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}

{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}
{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}
{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}

{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}
{\*\mmodsofldmpdata\mmodsofmcolumn-1\mmodsolid1033}\mmodsocoldelim9\mmjdsotype1\mmodsofhdr1}}
Collapse this tableExpand this table
Control wordDescription
\*\mailmergeSpecifies all the mail merge information for a document that has been connected to an external data source as part of a mail merge operation.
\linktoquerySpecifies that the current RTF document's query string, stored in the <mmquery> control word and used to specify the data to be imported from the external data source, actually contains a reference to an external query file that contains the actual query data to be used against the specified external data source for the mail merge. This query shall mimic a SQL query and be of the following form: SELECT * FROM <query file path>.

If this element is omitted, the query specified for the data source that is attached to the current document shall be assumed to not be a query that contains a link to an external file.
\mmdefaultsqlSpecifies if a given merged RTF document shall prompt its conforming hosting application to use the default SQL query string. The default SQL query string for merged RTF documents is "SELECT * FROM <datasource>".
\*\mmconnectstrdataSpecifies the hexadecimal encoded connection string used to reconnect to an external data source.
\mmquerySpecifies the Structured Query Language string that shall be run against the specified external data source to return the set of records from the external data that shall be imported into merged RTF documents when the mail merge operation is performed. If this control word is omitted, no query shall be associated with the current data source.
\mmdatasourceSpecifies the location of the external data source to be connected to a given RTF document.
\mmheadersourceSpecifies the location of a file that contains the column header information that shall be used when connecting to an external data source that does not have column header data specified. Specifically, this control word specifies a file that corresponds with the external data source specified by the <mmdatasource> control word.

Note Column headers are needed to enable a hosting application to associate an external data source's columns to fields via the <mmodsofldmpdata> control word.
\mmblanklinksSpecifies how an application performing the mail merge shall handle blank lines in the merged documents resulting from the mail merge. Typically, when a mail merge is performed, any blank lines that result from lines whose sole contents are merge fields with no content are removed from the merged document to prevent extraneous blank lines from appearing in the merged documents. When this control word is present, the merged documents that are generated from the mail merge shall not have any blank lines removed before they are sent to their destination format.

If this control word is omitted, the merged documents that are generated from this mail merge shall have all blank lines suppressed if they consist of only merge fields with values that consist of empty strings.
\mmaddfieldnameSpecifies the column within a given external data source that contains e-mail addresses. This control word is specified independently of the field mappings specified for a given merged document via the <mmodsofldmpdata> control word.

If this control word is omitted, or if no column exists in the data source with this column name, the source document specifies that no e-mail address data shall be associated with this mail merge.

Note This control word is generally used to allow the e-mailing of merged documents resulting from populating the fields within a merged document with external data.

This control word is independent of the field mapping that is specified for a given merged document via the <mmodsofldmpdata> control word. This separation enables applications to e-mail the documents resulting from the population of RTF fields with external data regardless of the presence or absence of a field mapped to external data specifying e-mail addresses.
\mmmailsubjectSpecifies the text that shall appear in the subject line of the e-mail messagess or faxes that result after the actions of a mail merge have imported external data into fields within a merged RTF document whose destination is e-mail or fax as specified by the <mmdestemail> or <mmdestfax> control words.

If this control word is omitted, no subject line text shall be associated with each merged document produced via a mail merge using the specified mail merge data. If the <mmdestemail> or <mmdestfax> control words are not leveraged, this control word shall be ignored.
\mmattachSpecifies that, after importing external data into fields to generate a series of destination RTF documents as e-mails, the resulting documents should be e-mailed as an attachment rather than the body of the actual e-mail.

If the <mmdestemail> control word is not present, this control word shall be ignored.
\mmshowdataSpecifies that a specific merged document shall display the data from the specified external data source where merge fields have been inserted. The <mmreccur> control word is used to specify which record within the external data source is to have its applicable data displayed where applicable within the RTF merged document.

If the <mmreccur> control word is not present in the RTF for the document leveraging this control word, the hosting application may behave as if the <mmreccur> control word's parameter was equal to 1.
\mmreccurNSpecifies that the hosting application shall display the given record from the specified external data source in place of the fields to which its data is mapped via the <mmodsofldmpdata> control word in a merged document. When this control word is present, the parameter shall specify the one-based index of the record from that data source that shall be used to populate this document.

If the <mmreccur> control word is omitted with the <mmshowdata> control word present, the hosting application shall behave as if the <mmreccur> control word’s parameter was equal to 1. If the <mmshowdata> control word is omitted, this control word shall be ignored. If the <mmreccur> control word’s parameter is less than 1 or greater than the number of records in the specified external data source, the hosting application shall treat this parameter as if it were equal to 1.
\mmerrorsNSpecifies the type of error reporting that shall be conducted by an application when performing a mail merge against the specified source data.

The type of error reporting implied by this control word shall be defined as follows:
  • Simulate the population of fields with mapped external data, and report errors in a new document if the parameter is equal to 1.
  • While populating fields with mapped external data, pausing to report each error as it occurs if the parameter is equal to 2.
  • Populate fields with mapped external data, and report errors in a new document if the parameter is equal to 3.
  • If this control word is omitted, or if its parameter is set to a parameter outside of those specified above, its parameter shall be assumed to be 2.
\*\mmodsoSpecifies a group of additional settings for the mail merge information included as part of the current document, the sum total of which is referred to as the Office Data Source Object (ODSO) settings for the mail merge.

If the <mmdatatypeodso> control word is not used, the settings that are specified within this control word may be ignored in favor of their non-ODSO equivalents.
\*\mmodsoudldataSpecifies the Universal Data Link (UDL) connection string used to reconnect to an external data source. The destination specified by this control word shall contain the hexadecimal encoding of the connection string that the hosting application shall pass to a external data source access application to enable the RTF document to be reconnected to the specified external data source.

If this destination is omitted, no UDL connection string shall be associated with the ODSO data for this mail merge.

This connection string is only used under the following conditions:
  • The <mmdatatypeodso> control word is used in the given RTF file.
  • The current application is able to use the ODSO information to access the data source.
\mmodsotableSpecifies the particular set of data that a source or merged RTF document shall be connected to within an external data source that contains multiple data sets. In other words, when connecting to a RTF document to an external data source that may have more than one repository of data within it, such as a database that has multiple tables or a spreadsheet that has multiple worksheets, this control word is used to distinguish the specific table or spreadsheet from which data will be imported from within the external data source.
\mmodsosrcSpecifies the location of the external data source to be connected to a given RTF document to perform the mail merge.

This control word is used to specified the location of the external data source only under the following conditions:
  • The <mmdatatypeodso> control word is used in the given RTF file.
  • The current application is able to use the ODSO information to access the data source.
\*\mmodsofilterSpecifies which data records within the external data source are to be included within the mail merge.

If the destination of this control word conflicts with the <mmodsoudldata> control word, the <mmodsoudldata> control word shall take precedence.
\*\mmodsosortSpecifies the order in which the data records within the external data source are to be included within the mail merge.

If the destination of this control word conflicts with the <mmodsoudldata> control word, the <mmodsoudldata> control word shall take precedence.
\*\mmodsofldmpdataSpecifies how a column specified in the external data source that has been connected to an RTF document shall be mapped to the fields <\field> within the given merged document's contents. Each instance of a <mmodsofldmpdata> control word contains the information that is needed to map one column in the external data source to a single type of field for the purposes of the mail merge in the current document.
\mmodsonameSpecifies the column name within a given external data source for the column whose index is specified via the <mmodsofmcolumn> control word. This data source name provides a column name that shall be used to map a specific field in the document, as specified by the <mmodsofldmpdata> control word. The parameter of this control word specifies the name of this column in the data source when the connection is initially established, which is then used permanently to link columns in the database to fields in the document.

If this control word is omitted, no data source name is provided for the current column.
\mmodsomappednameSpecifies the predefined RTF field name that shall be mapped to the column number specified by the <mmodsofmcolumn> control word within an instance of the <mmodsofldmpdata>.

If the application does not have a predefined merge field whose name matches the name specified using the destination of this control word, this control word may be ignored.
\mmodsofmcolumnNNSpecifies the zero-based index of the column within a given external data source that shall be mapped to the local name of a specific MERGEFIELD field specified by the parent field mapping data. The parameter specifies this index value, which is used to look up the appropriate column in the data source.

If this control word is omitted, or if its value exceeds the number of columns in the associated data source, the index of the referenced column shall be assumed to be 0.
\mmodsodynaddrNSpecifies that the contents of the AddressBlock field shall be dynamically ordered based on the country associated with the current record or if the country-invariant version of the address field shall be used in its place.

If this control word is omitted, the form of the address shall be dynamically determined based on the country specified in the current record.
\mmodsosolitNSpecifies the language ID for the language that was used to generate the merge field name that was associated with a given column in the data source. This control word specifies that when this field mapping is processed by an application, it shall interpret the merge field name as the name for the specified language.

If this control word is omitted, the mapped field names specified in the current document may be interpreted using any method desired by the consuming application. In other words, no language data is included with the field mapping information.
\mmodsocoldelimNSpecifies the character that shall be interpreted as the column delimiter used to separate columns within external data sources. The character representing the specific delimiter used for the external data source referenced by a source or merged RTF document is specified via a decimal number representing the decimal number for the Unicode character representation within this control word’s parameter.

If this control word is omitted, no column delimiter shall be specified for the data source in this mail merge.
\mmjdsotypeNSpecifies the type of external data source to be connected to via as part of the ODSO connection information for this mail merge. This setting is purely a suggestion of the data source type that is being used for this mail merge. This setting may be ignored in favor of an alternative mechanism if one is present.
\mmodsofhdrNNSpecifies that a hosting application shall treat the first row of data in the specified external data source as a header row containing the names of each column in the data source, rather than data to populate mapped fields in a merged document.

If this control word is omitted, the first row of the data source shall not be considered a header row when a mail merge is performed.
\*\mmodsorecipdataSpecifies all of the inclusion/exclusion data for the contents of the specified mail merge data source.
\mmodsoactiveNNSpecifies whether a specific record from the specified external data source shall be imported into a merged RTF document when the mail merge defined for a source document is performed. If this control word’s parameter is set to 0, the record specified by the parent control word shall not used to create a merged document.

If this control word is omitted for a given record, the data record associated with it shall be imported into a merged RTF document when the mail merge is performed.
\mmodsohashNNSpecifies a unique hash value used to maintain a relationship between a specific record within an external data source and a given source or merged document.
\mmodsocolumnNNSpecifies the column within the specified external data source that contains unique data for the current record within that data source. This control word shall be used in conjunction with the <mmodsouniquetag> control word to maintain a relationship between a specific record within an external data source and a given source or merged document. The parameter of this control word shall be interpreted as a zero-based index into the columns specified by the data source, specifying the resulting column as the column in which the <mmodsouniquetag> control word shall be looked up.

If this control word specifies a column number that exceeds the number of columns in the specified external data source, its value shall be ignored.
Mail merge field map data type

This specifies the data type of the mapped mail merge field.
Collapse this tableExpand this table
Control wordDescription
\mmfttypenullMail merge field map data type is null.
\mmfttypedbcolumnMail merge field map data type is database column.
\mmfttypeaddressMail merge field map data type is address block.
\mmfttypesalutationMail merge field map data type is salutation.
\mmfttypemappedMail merge field map data type is mapped.
\mmfttypebarcodeMail merge field map data type is barcode.
Mail merge destination

This specifies the possible results that may be generated when a mail merge is carried out on a given RTF source document. In other words, this control word is used to specify what is to be done with the merged documents that result from populating the fields in a given merged RTF document with data from the specified external data source.
Collapse this tableExpand this table
Control wordDescription
\mmdestnewdocSpecifies that conforming hosting applications shall generate new documents by populating the fields within a given merged RTF document with data from the specified external data source.
\mmdestprinterSpecifies that conforming hosting applications shall print the documents that result from populating the fields within a given merged RTF document with data from the specified external data source.
\mmdestemailSpecifies that conforming hosting applications shall generate emails using the documents that result from populating the fields within a given merged RTF document with data from the specified external data source.
\mmdestfaxSpecifies that conforming hosting applications shall generate faxes using the documents that result from populating the fields within a given merged RTF document with data from the specified external data source.
Types of mail merge source documents

This specifies the mail merge main document "document type."
Collapse this tableExpand this table
Control wordDescription
\mmmaintypecatalogSpecifies that the mail merge source document is of the catalog type.
\mmmaintypeenvelopesSpecifies that the mail merge source document is of the envelope type.
\mmmaintypelabelsSpecifies that the mail merge source document is of the label type.
\mmmaintypelettersSpecifies that the mail merge source document is of the letter type.
\mmmaintypeemailSpecifies that the mail merge source document is of the e-mail message type.
\mmmaintypefaxSpecifies that the mail merge source document is of the fax type.
Types of mail merge data types

This specifies the possible values for the types of external data sources to be connected to via the Dynamic Data Exchange (DDE) system (such as a spreadsheet or a database) or the alternative method of data access if the Dynamic Data Exchange system is not used.
Collapse this tableExpand this table
Control wordDescription
\mmdatatypeaccessSpecifies that a given merged RTF document has been connected to a database via the Dynamic Data Exchange (DDE) system.
\MmdatatypeexcelSpecifies that a given merged RTF document has been connected to a database via the Dynamic Data Exchange (DDE) system.
\MmdatatypeqtSpecifies that a given merged RTF document has been connected to an external data source by using an external query tool.
\mmdatatypeodbcSpecifies that a given merged RTF document has been connected to an external data source via the Open Database Connectivity interface.
\mmdatatypeodsoSpecifies that a given merged RTF document has been connected to an external data source via the Office Data Source Object (ODSO) interface.
\mmdatatypefileSpecifies that a given merged RTF document has been connected to a text file via the Dynamic Data Exchange (DDE) system.
Document protection

This specifies the write protection settings that have been applied to this document. Write protection refers to a mode in which the document's contents cannot be edited. Additionally, the document cannot be resaved by using the same file name.
Collapse this tableExpand this table
Control wordDescription
\readonlyrecommendedSpecifies that the hosting application should provide user interface recommending that the user open this document in write protected state. If the user chooses to do so, the document shall be write protected. Otherwise, the document shall be opened as fully editable.

Write protection refers to a mode in which the document's contents cannot be edited, and the document cannot be resaved by using the same file name.
\*\writereservationSpecifies that the application shall prompt for a password to exit write protection.

Write protection refers to a mode in which the document's contents cannot be edited, and the document cannot be resaved by using the same file name.
OLE

The \*\objclass control word introduces OLE objects. OLE allows objects such as spreadsheets, images, documents, and so on to be embedded in an RTF document.
Collapse this tableExpand this table
Control wordDescription
\*\objclassSpecifies the object class for an OLE object.
\*\oleclsidSpecifies the class ID (CLSID) of an OLE object that is not registered. Specifically, if the CLSID of the object is not registered, the object is stamped with a known registered CLSID that is instantiated as the destination of the <oleclsid> control word.

RTF readers shall revise the destination of this control word if necessary upon reading a given RTF file.
Additional new control words

The following table lists the new control words that are added to mail merge.
Collapse this tableExpand this table
Control wordDescription
\contextualspaceSpecifies that any space specified before <sbN> or after <saN> this paragraph should not be applied when the preceding and following paragraphs are of the same paragraph style, affecting the top and bottom spacing respectively. This control word is typically used for paragraphs in lists in which any space between subsequent list items, even if inherited from another style, is not desirable.
\hresNSpecifies hyphenation rules for a text run.
\chresNSpecifies the type of hyphenation rule for a text run.

XML Namespace table

XML Namespace tables contain the Namespaces for XML and SmartTags that are used in an RTF-formatted document.

SmartTags and custom XML markup each provide a facility for embedding customer-defined semantics into the document as follows:
  • SmartTags use the ability to provide a basic Namespace or Name for a run or set of runs in a document
  • Custom XML markup uses the ability to tag the document that uses XML elements and attributes that are specified by any valid XML Schema file.
The following table lists the new Namespace Table keywords that have been added for XML tags and SmartTags.
Collapse this tableExpand this table
KeywordUsage
<xmlnstbl>{\*\xmlnstbl' <xmlnsdecl>* '}
<xmlnsdecl>'{'<xmlns> #PCDATA '}'
<xmlns>\xmlnsN
An example of usage is as follows:
{\*\xmlnstbl{\xmlns1 { HYPERLINK "http://exmapleuri.org" }}}
Collapse this tableExpand this table
Control wordDescription
\*\xmlnstblXML namespace table
\xmlnsNXML namespace table entry

SmartTag data to RTF

SmartTags provide a facility for embedding customer-defined semantics into the document by using the ability to provide a basic Namespace or Name for a run or set of runs in a document.

The following table lists the new keywords that have been added to convert SmartTag data to RTF.
Collapse this tableExpand this table
KeywordUsage
<smarttagopen>'{\*\xmlopen' <xmlns><smarttagname><xmlattr>* '}'
<xmlns>\xmlnsN
<smarttagname>#PCDATA
<xmlattr>'{\xmlattr' <xmlattrns><xmlattrname><xmlattrvalue>'}'
<xmlattrns>\xmlattrnsN
<xmlattrname>\xmlattrname #PCDATA
<xmlattrvalue>\xmlattrvalue #PCDATA
<smarttagclose>'{\*\xmlclose}'
An example of usage is as follows:
{\*\xmlopen\xmlns2{\factoidname date}
{\xmlattr\xmlattrns0{\xmlattrname Month}{\xmlattrvalue 4}}
{\xmlattr\xmlattrns0{\xmlattrname Day}{\xmlattrvalue 11}}
{\xmlattr\xmlattrns0{\xmlattrname Year}{\xmlattrvalue 2006}}}4/11/2006}
{\*\xmlclose}
Collapse this tableExpand this table
Control wordDescription
\*\xmlopenSpecifies the beginning of the given SmartTag.
\xmlnsNSpecifies the name space of the given SmartTag.
\xmlattrnsNSpecifies the name space of an attribute of the given SmartTag.
\xmlattrvalueSpecifies the value of an attribute of the given SmartTag.
\xmlattrnameSpecifies the name of an attribute of the given SmartTag.
\*\xmlcloseSpecifies the ending of the given SmartTag.

Document password to modify or to protect forms

The following table lists the new keyword that is added to modify or to protect forms.
Collapse this tableExpand this table
KeywordUsage
<password>'{\*\password' #PCDATA '}'
An example of usage is as follows:
{\*\password 00000000}
Collapse this tableExpand this table
Control wordDescription
\*\passwordSpecifies the string that is needed to open a password-protected RTF document.

New keywords for existing properties

The following table lists the new keywords that are added for existing properties.
Collapse this tableExpand this table
KeywordDescription
\wrapdefaultDefault wrapping
\wraparoundWrap around the object
\wraptightTightly wrap around the object
\wrapthroughText flows through the object
\overlayObject can overlay text
\lvltentativeThis level is tentative (in the \list destination)
\saveprevpictShould the document save a preview picture or not
\wgrffmtfilterStyle pane format filter (used to filter which styles are visible)
\ilfomacatclnupThe last list processed during list cleanup (used to continue cleanup later)

Complex script keywords

The following table lists keywords that are already documented in the RTF Specification. However, the following keywords are now written more frequently.
Collapse this tableExpand this table
KeywordDescription
\abassoc bold
\acfassoc color
\adeflangmain bidi language for the doc
\afassoc font
\afsassoc size
\aiassoc italic
\alangassoc lang
\assocfont association info, not used, ignored
\aulassoc underline
\colordiaccolor diacritics
\facingcolfacing columns
\fbidifont in doc's font table
\fbidissingle CHP RTF
\fcsfcs0 marks non-SA run, fcs1 marks SA run
\ltrchltr char run props
\ltrdocltr doc
\ltrparltr para
\ltrrowltr table
\ltrsectltr section
\nbidianumbering formats, word 6 style
\nbidibnumbering formats, word 6 style
\pnbidianumbering formats
\pnbidibnumbering formats
\rtlchrtl run
\rtldocrtl doc
\rtlparrtl para
\rtlrowrtl table
\rtlsectrtl section

REFERENCES

For more information about Rich Text Format (RTF) Specification, version 1.8, visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?familyid=ac57de32-17f0-4b46-9e4e-467ef9bc5540

Properties

Article ID: 922681 - Last Review: August 18, 2006 - Revision: 2.2
APPLIES TO
  • Microsoft Office Word 2003
  • Microsoft Word 2002 Standard Edition
Keywords: 
kbtshoot kbexport kbimport kbexpertiseinter kbinfo KB922681

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com