<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Agregar una propiedad de documento personalizada</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Agrega una propiedad de documento personalizada a un documento de Word o un libro de Excel.</Description>
      <HelpUrl></HelpUrl>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Keywords>
        <Keyword></Keyword>
      </Keywords>
      <Shortcut></Shortcut>
    </Header>
    <Snippet>
      <References>
        <Reference>
          <Assembly>Office.dll</Assembly>
          <Url></Url>
        </Reference>
      </References>
      <Imports>
        <Import>
          <Namespace>Microsoft.Office.Core</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Literal Editable="true">
          <ID>propertyName</ID>
          <Type>System.String</Type>
          <ToolTip>Reemplazar por el nombre de la propiedad.</ToolTip>
          <Default>"Property Name"</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>propertyType</ID>
          <Type>Office.MsoDocProperties</Type>
          <ToolTip>Reemplazar por el tipo de datos de la propiedad. Uno de los valores Office.MsoDocProperties.</ToolTip>
          <Default>msoPropertyTypeString</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>propertyValue</ID>
          <Type>System.String</Type>
          <ToolTip>Reemplazar por el valor de la propiedad.</ToolTip>
          <Default>"Property Value"</Default>
          <Function></Function>
        </Literal>
        <Object Editable="true">
          <ID>newProperty</ID>
          <Type>Microsoft.Office.Core.DocumentProperty</Type>
          <ToolTip>Reemplazar por el nuevo objeto DocumentProperty.</ToolTip>
          <Default>newProperty</Default>
          <Function></Function>
        </Object>
        <Object Editable="true">
          <ID>document</ID>
          <Type>Microsoft.Office.Core.Document</Type>
          <ToolTip>Reemplazar por el documento o libro a los que agregar la propiedad.</ToolTip>
          <Default>document</Default>
          <Function></Function>
        </Object>
      </Declarations>
      <Code Language="CSharp" Kind="" Delimiter="$"><![CDATA[
Microsoft.Office.Core.DocumentProperty $newProperty$ = 
((Microsoft.Office.Core.DocumentProperties)$document$.CustomDocumentProperties).Add(
$propertyName$, false, Office.MsoDocProperties.$propertyType$, $propertyValue$);
			]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
