WorkbookBase.UpdateLinks (Propiedad)
Obtiene o establece un valor que indica la configuración de un libro para la actualización de los vínculos OLE incrustados.
Espacio de nombres: Microsoft.Office.Tools.Excel
Ensamblado: Microsoft.Office.Tools.Excel.v4.0.Utilities (en Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
Sintaxis
'Declaración
Public Property UpdateLinks As XlUpdateLinks
public XlUpdateLinks UpdateLinks { get; set; }
Valor de propiedad
Tipo: Microsoft.Office.Interop.Excel.XlUpdateLinks
Uno de los valores de XlUpdateLinks.
Ejemplos
El ejemplo de código siguiente usa la propiedad UpdateLinks para mostrar cómo se actualizan en el libro los vínculos OLE incrustados.
Se trata de un ejemplo para una personalización en el nivel del documento.
Private Sub DisplayLinkUpdateType()
Select Case Me.UpdateLinks
Case Excel.XlUpdateLinks.xlUpdateLinksAlways
MsgBox("Links will always be updated.")
Case Excel.XlUpdateLinks.xlUpdateLinksNever
MsgBox("Links will never be updated.")
Case Excel.XlUpdateLinks.xlUpdateLinksUserSetting
MsgBox("Links will update according " & _
"to the user settting.")
End Select
End Sub
private void DisplayLinkUpdateType()
{
switch (this.UpdateLinks)
{
case Excel.XlUpdateLinks.xlUpdateLinksAlways:
MessageBox.Show("Links will always be updated.");
break;
case Excel.XlUpdateLinks.xlUpdateLinksNever:
MessageBox.Show("Links will never be updated.");
break;
case Excel.XlUpdateLinks.xlUpdateLinksUserSetting:
MessageBox.Show("Links will update according " +
"to the user settting.");
break;
}
}
Seguridad de .NET Framework
- Plena confianza para el llamador inmediato. Un código de confianza parcial no puede utilizar este miembro. Para obtener más información, vea Utilizar bibliotecas de código que no es de plena confianza.