Quotes around text?

Sorry for what is likely a dumb question that has already been answered that I can't locate, but here goes:

  • I've selected/highlighted a line/block of text in whatever program I'm in.
  • Can I use KM to place a quote at the beginning and a quote at the end of that block? Would be nice to use smart quotes, but a simple " would be fine as well.

Thanks!

Hey there, no such thing as a dumb question, especially when you’ve done your part to try and find an answer and haven’t been successful. But yes, that’s very straightforward. See the example macro below.

Wrap Highlighted Text in Smart Quotes.kmmacros (2.4 KB)

Macro Screenshot (click to expand/collapse)

1 Like

Thank you so much! Your time and expertise are greatly appreciated!

Text Toolbox II includes a macro called Quote Selection to do just that.

1 Like

Many thanks!

Extra space at the end in Outlook and Word:

OK, what am I doing wrong?

I'm using:

A screenshot of a computer Description automatically generated

In Word I select the text: A screenshot of a computer Description automatically generated

And apply the macro and it adds a space at the end of the selection:

A screenshot of a computer Description automatically generated

Same thing happens in Microsoft Outlook:

A screenshot of a computer Description automatically generatedA screenshot of a computer Description automatically generated

But in Apple Notes it behaves as one would hope:

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

I’m stumped !

Whoops, it didn't take the images. Here they are.


Screenshot 2023-10-04 at 15.03.53
Screenshot 2023-10-04 at 15.04.09

Screenshot 2023-10-04 at 15.04.58
Screenshot 2023-10-04 at 15.05.18

You’re using Microsoft products... :wink: haha j/k, sort of... but honestly, the macOS copy/paste function doesn’t always play well with Microsoft products. Several of my macros that copy/paste end up with either an extra trailing space, or deleting a trailing space upon pasting. I have no idea why, but since it only does it with Microsoft products, I blame them.

Hi, @CharPatton. I suspect it’s related to this: Understanding Smart Cut and Paste (Microsoft Word)

2 Likes

Thanks to you both for responding!

I'm glad it wasn't something I did.

Some day when I'm smarter and have some time I'll play with the ideas presented in “Understanding Smart Cut and Paste (Microsoft Word)”, but in the interval I'll just live with it :slight_smile:

You can try this (culled from the link I gave you above). It works fine in LibreOffice, as close to Word as I care to get.

55)Quote Selection.kmmacros (14.0 KB)

1 Like

Interesting, and annoying. :sweat_smile: Thanks for the reference Jim!

Couldn't this Microsoft Smart Cut and Paste behaviour be countered by something resembling what I've done below, by adding the Group in yellow to @cdthomer's original macro? (Don't have any Microsoft apps installed to test it myself)

Wrap Highlighted Text in Smart Quotes WITH POSSIBLE FIX FOR MICROSOFT SMART CUT AND PASTE Macro (v10.2)

Wrap Highlighted Text in Smart Quotes WITH POSSIBLE FIX FOR MICROSOFT SMART CUT AND PASTE.kmmacros (5.0 KB)

Hi, @CharPatton. I modified @cdthomer's macro to work with my version of Word. As he mentioned, Microsoft's copy/paste is odd.

Download: Wrap Highlighted Text in Smart Quotes v2.kmmacros (4.4 KB)

Macro-Image


Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.

System Information
  • macOS 13.5.2 (22G91)
  • Keyboard Maestro v10.2

1 Like

Works perfectly with the word "test" (as above) in Outlook (Version 16.77.1), Word (Version 16.77.1), and Notes (Version 4.10). I'm not sure I'm smart enough to understand the code, but function seems AOK.

Many, many thanks!!!

1 Like