Microsoft KB Archive/922681

From BetaArchive Wiki

Article ID: 922681

Article Last Modified on 8/18/2006



APPLIES TO

  • Microsoft Office Word 2003
  • Microsoft Word 2002 Standard Edition



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.

Keyword Usage
<mailmerge> { \*\mailmerge <mmmaintype> \mmlinktoquery? <mmdatatype> \mmdefaultsql? <mmconnectstrdata>? <mmquery>? <mmdatasource>? \mmblanklinks? <mmheadersource> <mmdest> <mmaddfieldname>? <mmmailsubject>? \mmattach? \mmshowdata? \mmreccurN \mmerrorsN <mmodso>* \mmodsocoldelimN \mmjdsotypeN \mmodsofhdrN <mmodsorecipdata>+
<mmmaintype> \mmmaintypeenvelopes | \mmmaintypelabels | \mmmaintypeletters | \mmmaintypeemail | \mmmaintypefax
<mmdatatype> \mmdatatypeexcel | \mmdatatypeqt | \mmdatatypeodbc | \mmdatatypeodso | \mmdatatypefile
<mmconnectstrdat> '{'\mmconnectstrdat #SDATA'}'
<mmquery> ‘{ ‘\mmquery #PCDATA'}'
<mmdatasource> ‘{ ‘\mmdatasource #PCDATA'}'
<mmheadersource> ‘{ ‘\mmheadersource #PCDATA' }'
<mmdest> \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> \mmfttypedbcolumn | \mmfttypeaddress | \mmfttypesalutation | \mmfttypemapped | \mmfttypebarcode
<mmodsoname> '{'\mmodsoname #PCDATA' }'
<mmodsomappedname> '{'\mmodsomappedname #PCDATA' }'
<mmodsorecipdata> '{\*'\mmodsorecipdata \mmodsoactiveN <uniqueid>'}'
<uniqueid> \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}}
Control word Description
\*\mailmerge Specifies all the mail merge information for a document that has been connected to an external data source as part of a mail merge operation.
\linktoquery Specifies 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.

\mmdefaultsql Specifies 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>".
\*\mmconnectstrdata Specifies the hexadecimal encoded connection string used to reconnect to an external data source.
\mmquery Specifies 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.
\mmdatasource Specifies the location of the external data source to be connected to a given RTF document.
\mmheadersource Specifies 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.

\mmblanklinks Specifies 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.

\mmaddfieldname Specifies 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.

\mmmailsubject Specifies 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.

\mmattach Specifies 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.

\mmshowdata Specifies 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.

\mmreccurN Specifies 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.

\mmerrorsN

Specifies 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.
\*\mmodso Specifies 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.

\*\mmodsoudldata

Specifies 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.
\mmodsotable Specifies 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.
\mmodsosrc

Specifies 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.
\*\mmodsofilter Specifies 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.

\*\mmodsosort Specifies 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.

\*\mmodsofldmpdata Specifies 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.
\mmodsoname Specifies 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.

\mmodsomappedname Specifies 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.

\mmodsofmcolumnNN Specifies 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.

\mmodsodynaddrN Specifies 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.

\mmodsosolitN Specifies 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.

\mmodsocoldelimN Specifies 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.

\mmjdsotypeN Specifies 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.
\mmodsofhdrNN Specifies 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.

\*\mmodsorecipdata Specifies all of the inclusion/exclusion data for the contents of the specified mail merge data source.
\mmodsoactiveNN Specifies 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.

\mmodsohashNN Specifies 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.
\mmodsocolumnNN Specifies 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.

Control word Description
\mmfttypenull Mail merge field map data type is null.
\mmfttypedbcolumn Mail merge field map data type is database column.
\mmfttypeaddress Mail merge field map data type is address block.
\mmfttypesalutation Mail merge field map data type is salutation.
\mmfttypemapped Mail merge field map data type is mapped.
\mmfttypebarcode Mail 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.

Control word Description
\mmdestnewdoc Specifies 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.
\mmdestprinter Specifies 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.
\mmdestemail Specifies 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.
\mmdestfax Specifies 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."

Control word Description
\mmmaintypecatalog Specifies that the mail merge source document is of the catalog type.
\mmmaintypeenvelopes Specifies that the mail merge source document is of the envelope type.
\mmmaintypelabels Specifies that the mail merge source document is of the label type.
\mmmaintypeletters Specifies that the mail merge source document is of the letter type.
\mmmaintypeemail Specifies that the mail merge source document is of the e-mail message type.
\mmmaintypefax Specifies 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.

Control word Description
\mmdatatypeaccess Specifies that a given merged RTF document has been connected to a database via the Dynamic Data Exchange (DDE) system.
\Mmdatatypeexcel Specifies that a given merged RTF document has been connected to a database via the Dynamic Data Exchange (DDE) system.
\Mmdatatypeqt Specifies that a given merged RTF document has been connected to an external data source by using an external query tool.
\mmdatatypeodbc Specifies that a given merged RTF document has been connected to an external data source via the Open Database Connectivity interface.
\mmdatatypeodso Specifies that a given merged RTF document has been connected to an external data source via the Office Data Source Object (ODSO) interface.
\mmdatatypefile Specifies 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.

Control word Description
\readonlyrecommended Specifies 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.

\*\writereservation Specifies 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.

Control word Description
\*\objclass Specifies the object class for an OLE object.
\*\oleclsid Specifies 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.

Control word Description
\contextualspace Specifies 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.
\hresN Specifies hyphenation rules for a text run.
\chresN Specifies 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.

Keyword Usage
<xmlnstbl> {\*\xmlnstbl' <xmlnsdecl>* '}
<xmlnsdecl> '{'<xmlns> #PCDATA '}'
<xmlns> \xmlnsN

An example of usage is as follows:

{\*\xmlnstbl{\xmlns1 { HYPERLINK "http://exmapleuri.org" }}}
Control word Description
\*\xmlnstbl XML namespace table
\xmlnsN XML 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.

Keyword Usage
<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}
Control word Description
\*\xmlopen Specifies the beginning of the given SmartTag.
\xmlnsN Specifies the name space of the given SmartTag.
\xmlattrnsN Specifies the name space of an attribute of the given SmartTag.
\xmlattrvalue Specifies the value of an attribute of the given SmartTag.
\xmlattrname Specifies the name of an attribute of the given SmartTag.
\*\xmlclose Specifies 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.

Keyword Usage
<password> '{\*\password' #PCDATA '}'

An example of usage is as follows:

{\*\password 00000000}
Control word Description
\*\password Specifies 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.

Keyword Description
\wrapdefault Default wrapping
\wraparound Wrap around the object
\wraptight Tightly wrap around the object
\wrapthrough Text flows through the object
\overlay Object can overlay text
\lvltentative This level is tentative (in the \list destination)
\saveprevpict Should the document save a preview picture or not
\wgrffmtfilter Style pane format filter (used to filter which styles are visible)
\ilfomacatclnup The 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.

Keyword Description
\ab assoc bold
\acf assoc color
\adeflang main bidi language for the doc
\af assoc font
\afs assoc size
\ai assoc italic
\alang assoc lang
\assoc font association info, not used, ignored
\aul assoc underline
\colordiac color diacritics
\facingcol facing columns
\fbidi font in doc's font table
\fbidis single CHP RTF
\fcs fcs0 marks non-SA run, fcs1 marks SA run
\ltrch ltr char run props
\ltrdoc ltr doc
\ltrpar ltr para
\ltrrow ltr table
\ltrsect ltr section
\nbidia numbering formats, word 6 style
\nbidib numbering formats, word 6 style
\pnbidia numbering formats
\pnbidib numbering formats
\rtlch rtl run
\rtldoc rtl doc
\rtlpar rtl para
\rtlrow rtl table
\rtlsect rtl section


REFERENCES

For more information about Rich Text Format (RTF) Specification, version 1.8, visit the following Microsoft Web site:


Additional query words: word2003 word2k3 word11wd2003 wd2k3 wd11 word2002 word2k2 word10 wd2002 wd2k2 wd10

Keywords: kbtshoot kbexport kbimport kbexpertiseinter kbinfo KB922681