LinkToQuery class

Office 2013 and later

Query Contains Link to External Query File. When the object is serialized out as xml, its qualified name is w:linkToQuery.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class LinkToQuery : OnOffType

[ISO/IEC 29500-1 1st Edition]

linkToQuery (Query Contains Link to External Query File)

This element specifies that the current WordprocessingML document's query string, stored in the query element (§17.14.26) and used to specify the data to be imported from the external data source, actually contains a reference to an external query file which 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, then the query specified for the data source attached to the current document shall be assumed to not be a query containing a link to an external file.

[Example: Consider a mail merge source document that uses the linkToQuery element to specify that the query used is stored in the specified external data source as follows:

<w:mailMerge>
  …  <w:linkToQuery />
  <w:query w:val="SELECT * FROM C:\queryExample.txt" />
  …</w:mailMerge>

The linkToQuery element specifies that the query string stored in the query element (§17.14.26) is actually just a reference to an externally stored query file, in this case, an external query file stored at c:\queryExample.txt. end example]

Parent Elements

mailMerge (§17.14.20)

This element’s content model is defined by the common boolean property definition in §17.17.4.

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: