<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Proteger un documento</Title>
      <Author>Microsoft Corporation</Author>
      <Description>Establece las propiedades de protección para un documento de Word.</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>
      </References>
      <Imports>
        <Import>
          <Namespace>Word = Microsoft.Office.Interop.Word</Namespace>
        </Import>
      </Imports>
      <Declarations>
        <Literal Editable="true">
          <ID>noReset</ID>
          <Type>Boolean</Type>
          <ToolTip>Reemplazar por un valor booleano. False para restablecer los campos de formulario en sus valores predeterminados; true para mantener los valores de campo de formulario actuales si el documento está protegido. Si el tipo no es wdAllowOnlyFormFields, se omitirá el argumento NoReset.</ToolTip>
          <Default>True</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>password</ID>
          <Type>String</Type>
          <ToolTip>Reemplazar por la contraseña requerida para quitar la protección del documento. Dejar vacío para omitir una contraseña.</ToolTip>
          <Default>"Password"</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>useIRM</ID>
          <Type>Boolean</Type>
          <ToolTip>Reemplazar por un valor que especifique si hay que utilizar Information Rights Management (IRM) al proteger el documento de los cambios.</ToolTip>
          <Default>True</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>enforceStyleLock</ID>
          <Type>Boolean</Type>
          <ToolTip>Reemplazar por un valor que especifique si se fuerzan las restricciones de formato en un documento protegido.</ToolTip>
          <Default>True</Default>
          <Function></Function>
        </Literal>
        <Literal Editable="true">
          <ID>protectionType</ID>
          <Type>Word.WdProtectionType</Type>
          <ToolTip>Reemplazar por el tipo de protección para el documento. Uno de los valores Word.WdProtectionType.</ToolTip>
          <Default>wdAllowOnlyReading</Default>
          <Function></Function>
        </Literal>
        <Object Editable="true">
          <ID>document</ID>
          <Type>Microsoft.Office.Interop.Word.Document</Type>
          <ToolTip>Reemplazar por el documento que se va a proteger.</ToolTip>
          <Default>document</Default>
          <Function></Function>
        </Object>
      </Declarations>
      <Code Language="VB" Kind="" Delimiter="$"><![CDATA[
$document$.Protect( Word.WdProtectionType.$protectionType$, _
				    $noReset$, _
					$password$, _
					$useIRM$, _
				    $enforceStyleLock$)
			]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>
