FormField.Cut method (Word)
Removes the specified form field from the document and places it on the Clipboard.
Syntax
expression.Cut
expression Required. A variable that represents a 'FormField' object.
Example
This example deletes the first field in the active document and pastes the field at the insertion point.
If ActiveDocument.Fields.Count >= 1 Then
ActiveDocument.Fields(1).Cut
Selection.Collapse Direction:=wdCollapseEnd
Selection.Paste
End If
This example deletes the first word in the first paragraph and pastes the word at the end of the paragraph.
With ActiveDocument.Paragraphs(1).Range
.Words(1).Cut
.Collapse Direction:=wdCollapseEnd
.Move Unit:=wdCharacter, Count:=-1
.Paste
End With
This example deletes the contents of the selection and pastes them into a new document.
If Selection.Type = wdSelectionNormal Then
Selection.Cut
Documents.Add.Content.Paste
End If
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for