Macro of the Month – June/July 2021 – FullPoint
Inserts a period or replaces a comma or other punctuation mark with a period and lowercases the next word if needed
It’s summer in my hemisphere. This year I—finally—fulfilled my longstanding promise to myself to take time off to spend with family, and otherwise enjoy the season. As such, here is a combined June/July newsletter. This issue of the newsletter also launches a brief series about common errors that occur when installing and using macros and how to troubleshoot them. Do you regularly run into errors? Let me know.
FullPoint
Ever find yourself with a project full of long sentences or comma splices? FullPoint will save you time and effort by breaking the text into two sentences. (Don't forget to assign it a keyboard shortcut.)
Place the cursor where you want the first sentence to end, and run the macro. FullPoint inserts a period and capitalizes the next word. It will even delete punctuation, like a comma.
For example: This is a comma splice, you can break the text in two sentences with the FullPoint macro.
Becomes: This is a comma splice. You can break the text in two sentences with the FullPoint macro.
In this example, you would place the cursor anywhere in the word "splice", and then run the macro.
Common Error #1: Ambiguous name detected
Have you ever gotten this error when running a macro?
This error message means that you’ve installed the macro twice. (I do this all the time.) The solution? Delete one of them.
You might be confused because the Macro dialogue box in Word doesn’t list the macro twice. However, when you open Visual Basic, you will see that the macro appears twice.
Here are the steps to delete the duplicate macro (the screenshots are from a PC; the steps are the same for a Mac):
1. Open Visual Basic: Alt+F11 (PC) / Opt+F11 (Mac).
2. Click on the pulldown menu in the top right and scroll to the macro in question. You will see the macro listed twice. In this example, Hyphenate.
3. Click on one instance of the macro. That will place your cursor inside the macro.
4. Select the entire macro with your mouse. Be sure to select all the text, in this example from Sub Hyphenate() to End Sub.
5. Delete the text.
What is your current favorite macro?
Be safe and well,
Jennifer