Macro of the Month – June 2023 – DeleteRestOfSentence
Deletes text from the end of the current word to the end of the sentence, keeping the sentence-ending punctuation
Deadlines got the better of me. So here is the June macro in July. This month’s macro makes it more efficient to delete a bunch of text at once. Also, registration for the final Macro A to Z course for the year closes soon. Lastly, a big welcome to the new IPEd and PEG subscribers from the workshops Paul and I recently delivered there (sadly, not in person).
DeleteRestOfSentence
Sometimes when editing and writing I notice that the revisions I’ve made render the text at the end of a sentence no longer of use. DeleteRestOfSentence will eliminate this text all at once. (See below for macros that help you execute other deletions.) It saves you the time and strain of having to manually select the text you want to delete. You just need to tell it which text you want it to delete.
How to use it: When you realize that the text at the end of a sentence needs to be deleted, place the cursor inside the word the sentence should end on and run DeleteRestOfSentence. It deletes all the words, spaces, and punctuation marks between the end of that word and the sentence-ending punctuation.
When you place your cursor inside the word “fires” and run DeleteRestOfSentence, the macro deletes everything after that word, including punctuation marks, while preserving the period at the end.
Download the code:
https://www.wordmacrotools.com/macros/D/DeleteRestOfSentence.txt
Related macros:
DeleteOneWord deletes a single word without you needing to select it. Read about how it works in the December 2022 newsletter.
PunctuationOff deletes the next (to the right) punctuation mark, even if the cursor is not standing adjacent. Read about how it works in the October/November 2022 newsletter.
Tip for Searching in Word
If you want to learn some efficiency tips for using Word’s search feature—no macros needed—check out Paul’s super searching video tutorial. (Well, there is one macro to make the process more efficient for Mac users.)
Upcoming Training
Registration for the final Macros A to Z course of 2023 ends on July 10. The class will next be offered in early 2024.
Over six weeks, this hands-on course will teach you the essential skills for finding, installing, and using macros to increase your efficiency. It caters both to PC and Mac users and to those new to macros and those who have some experience with macros and want to get more out of them.
Here is what some past attendees have said about the course:
This was the most instantly helpful class I have had when it comes to doing my work faster, better, and more easily.
Great format to learn macros at a reasonable pace. I love that it had a structure, but also could be a bit self-paced for when things get busy and you fall behind.
Register here. Members of CIEP, IPEd, PEG, and Editors Canada are eligible for a discounted rate; check with your editing organization for details.
Have you recently discovered a new macro? Reply to this email and let me know.
Regards,
Jennifer