Inserting Styled Clipboard

Hi,

I want to apply typeface and size to the text in the styled clipboard, but I'm unable to build the macro. The clipboard management is driving me nuts.

Here's what I'm trying to do:

  • Type the ⌘C Keystroke
  • Set Named Clipboard 'Default Clipboard' to Styled Text '%CurrentClipboard%'
  • Apply Style to Named Clipboard 'Default Clipboard'
  • Insert Styled Text '%CurrentClipboard%' by Pasting
  • Delete Past Clipboard 0

Any help?

You are copying the clipboard to the named clipboard “Default Clipboard”, then you are applying styles to the named clipboard “Default Clipboard”, and then you are ignoring it completely and pasting in the current clipboard.

Instead, use:

  • Type the ⌘C Keystroke
  • Apply Style to System Clipboard
  • Type the ⌘V Keystroke
  • Delete Past Clipboard 0

Note that there may well be timing issues with that - if the application takes too long with processing the ⌘C, then the Apply Style action will work on the wrong clipboard. Also, if the application takes too long processing the ⌘V, then the clipboard may already be deleted by the time it gets around to it, resulting in the original clipboard being pasted.

And finally, there may always be clipboard caching problems whenever you change the clipboard in an application.

Sorry to revive this thread but it is related. My company asked us to use Outlook as our email now. Often, I have to refer to the old email system, copy historical discussions and paste to Outlook to continue the conversation there.

I will go to the old email body, highlight and do CMD-C. Then I let KM process the clipboard contents to change the font style and size to match Outlook. This is my macro:
image

The issue I faced is while the Style was changed to Calibri, the font size did not. Did I do anything wrong?

If I use my other macro, it works, since it removes all style and insert by typing. While this macro works, it is very slow especially when pasting long emails as I have to wait for each sentences to be type in real time.
image

Appreciate any pointers!

I find that "font sizes" don't always appear to be the same for different fonts. Did you actually check the numeric value of the font size before and after the paste? What was the size value before and after?

As for speed, the action that you are using has the option selected "Insert text by typing" while you could try the other option "insert text by pasting." Did you try that?

I'm just trying to help. I don't always come up with the right answer right away, but I'm trying.

Thanks, Sleepy... I appreciate an answer and pointing me with new ideas. No worries if it doesn't work. It's worth a try.

When I copied, it was some special "Default Sans Seriff" font with size 10. After the style makeover, the font changed to Calibri, which is correct, but the font size is now 9, instead of 12 (in the macro)

I tried this and it works! I get the font type and size ( as it just follow what is in Outlook).. and I get that instant speed- I don't know why I didn't think of this. Thanks @Sleepy

As for the font size issue, my theory, which you haven't really tested yet, is that the output font size may not be an exact match (probably because the system modifies the font size to account for the font style.) So tell me what happens if you change the number 12 to 18. Do you still get output size 9, for the same input, or do you get a larger number?

I know my idea sounds crazy, that the numbers are only "approximate", but it's a valid theory and you should test it by changing some of the numbers.

Font size=16, is pasted as font size=12

Font size=17 onwards in KM, after I pasted in Outlook and click my cursor there, the font size in Outlook ribbon bar is blank. Looks like anything above 17 size is left as it is.

The system does seem to modify things around.

Hi @cherry. Maybe I'm misunderstanding your requirement and, if so, I apologize.

But...

Is there a reason you cannot use Outlook's Edit > Paste and Match Style?

Sometimes...

Sometimes... the answer is JUST RIGHT UNDER YOUR NOSE!

I.. don't know how else to say it.

You are right! THANK YOU!!

1 Like

That happens to me all the time. Sorry my ideas were off base.