I have a document full of text frames. Is it possible to Ctrl-A (or equivalent) all the text frames, and delete them, rather than deleting one at a time? there are 1000s of them…
Unfortunately no.
The closest workaround is to display the Navigator: press the compass icon on the right side pane or F5
if not yet displayed.
Expand the Frames section by clicking on its small triangle.
You can now right click on a frame name and Delete
. If using an “older” version of LO, double-click on the name to select the frame and press Del
.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
It is not possible to select more than one TextFrame at a time.
However, your question seems to be badly worded.
If you actually want to delete all the TextFrames contained in a Writer document in one go, you should edit your question to tell so, and to not mislead users trying to help.
Assuming the radical deletion was what you actually wanted, the answer is:
(a) There is no standard command to do so.
(b1) If you delete a frame, its contents will also be deleted.
(b2) If you actually want to convert frame content to content of the text body, you should tell so clearly.
(c) If this is definitely about the radical deletion, you can run the “macro” (Sub) below.
Sub removeAllTextFramesFromWriterDocument(Optional pDoc)
If IsMissing(pDoc) Then pDoc = ThisComponent
tFs = pDoc.TextFrames
For Each tf In tFs
tf.Anchor.TextParagraph.Text.removeTextContent(tf)
Next tf
End Sub
My apologies, I was not meaning to mislead anyone with my question. I am after what you’re calling a radical deletio. I wish to delete every frame along with its content…
It looks like the macro you’ve provided might work, but I’ve no idea how to run it… Are there easy insturctrions anywhere?
have edited the question…
The macro should work (and was superficially tested), but I cannot exclude unforeseen complications.
To use a Basic macro you need to insert it into a module of a library. This may sound more complicated as it is.
Go >Tools>Macros>Organize Macros>Basic
Click the button Organizer
.
Select in the left panel My Macros>>Standard
Click the button New
.
Enter a module name (frameDeletion
e.g.) into the input line and confirm with OK
.
Left side click on the new module name (Change the selection once and back if needed…)
…to get the option button Edit
enabled.
Replace the standard macro Main
with the one you want to make available.
Only run the macro while your specific document is active.
If a problem should occur don’t save the probably damaged document, but report here first.
Perfect! Just ran the macro, and all frames are gone! thanks so much for that!