<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Enlazar datos a un marcador</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Enlaza datos a un objeto Bookmark de Word mediante un objeto BindingSource.</Description>
      <HelpUrl></HelpUrl>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Keywords>
        <Keyword></Keyword>
      </Keywords>
      <Shortcut></Shortcut>
    </Header>
    <Snippet>
      <References>
        <Reference>
          <Assembly>Microsoft.Office.Interop.Word.dll</Assembly>
          <Url></Url>
        </Reference>
        <Reference>
          <Assembly>Microsoft.Office.Tools.Word.dll</Assembly>
          <Url></Url>
        </Reference>
        <Reference>
          <Assembly>System.Windows.Forms.dll</Assembly>
          <Url></Url>
        </Reference>
      </References>
      <Imports>
        <Import>
          <Namespace>Word = Microsoft.Office.Interop.Word</Namespace>
        </Import>
        <Import>
          <Namespace>Microsoft.Office.Tools.Word</Namespace>
        </Import>
        <Import>
          <Namespace>System.Windows.Forms</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Literal Editable="true">
          <ID>dataMember</ID>
          <Type>System.String</Type>
          <ToolTip>Reemplazar por el miembro del origen de datos al que se desea enlazar, si es necesario.</ToolTip>
          <Default>"dataMember"</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>fieldName</ID>
          <Type>System.String</Type>
          <ToolTip>Reemplazar por el campo del miembro de datos que se va a mostrar en el marcador.</ToolTip>
          <Default>"fieldName"</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>propertyName</ID>
          <Type>System.String</Type>
          <ToolTip>Reemplazar por el nombre de la propiedad de control para enlazar.</ToolTip>
          <Default>"propertyName"</Default>
          <Function></Function>
        </Literal>
        <Object Editable="true">
          <ID>bindingSource</ID>
          <Type>System.Windows.Forms.BindingSource</Type>
          <ToolTip>Reemplazar por un origen de enlace para establecer el enlace de datos.</ToolTip>
          <Default>bindingSource</Default>
          <Function></Function>
        </Object>
        <Object Editable="true">
          <ID>dataSource</ID>
          <Type>System.Object</Type>
          <ToolTip>Reemplazar por un origen de datos al que se desea enlazar. Puede ser cualquier tipo al que pueda enlazarse, incluidos conjuntos de datos y tablas de datos, así como tipos personalizados.</ToolTip>
          <Default>dataSource</Default>
          <Function></Function>
        </Object>
        <Object Editable="true">
          <ID>bookmark</ID>
          <Type>Microsoft.Office.Tools.Word.Bookmark</Type>
          <ToolTip>Reemplazar por el marcador al que se van a enlazar los datos.</ToolTip>
          <Default>bookmark</Default>
          <Function></Function>
        </Object>
      </Declarations>
      <Code Language="CSharp" Kind="" Delimiter="$"><![CDATA[
BindingSource $bindingSource$ = new BindingSource();
$bindingSource$.DataSource = $dataSource$;
$bindingSource$.DataMember = $dataMember$;

$bookmark$.DataBindings.Add($propertyName$, $bindingSource$, $fieldName$);
			]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
