Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Deletes a dynamically created content control from the document and removes it from the ControlCollection in the document.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
Syntax
'Declaration
Sub Delete ( _
deleteContent As Boolean _
)
void Delete(
bool deleteContent
)
Parameters
deleteContent
Type: System.Booleantrue to delete the contents of the control; false to leave the contents of the control in the document.
Exceptions
| Exception | Condition |
|---|---|
| CannotRemoveControlException | The content control was added to the document at design time. |
Remarks
This method should only be used to delete a content control that is created programmatically at run time. An exception is thrown if you call this method on a content control that is added to the document at design time.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Office.Tools.Word Namespace