Problem with "write clipboard to doc" and how to write to docx

Hello,

I correspond with someone who only understands docx files (not RTFD etc)

The write clipboard action writes both clipboard text and images perfectly to RTFD as viewed in textedit.

I have 2 problems:
1- if I write to doc instead of RTFD, there are no images when viewed in MS Word. I only tried .doc because docx is not in the action's dropdown list
2- I am looking for a way to end up with a docx document

thank you very much

Screenshot (click to expand/collapse)

2024-06-14_15-10-26

Do you have Word yourself? If so, you could just have your macro open Word, paste the clipboard, and save. But I assume you don't have Word?

-rob.

1 Like

For once, I see things a bit differently. That being said you are the expert and I am the dilettante.

Opening word and pasting the clipboard is a bit time consuming. In addition, I have to save→ name the file, etc

I wonder if there is a script to convert RTFD to docx.
I still don't understand why KM is limited to doc instead of docx, and the absence of images.

thanks very much for your reply.

I didn't mean you'd do it, I mean you'd have KM do it for you:

  1. Activate Word
  2. File > New
  3. Paste Clipboard
  4. File Save > Save to /tmp under some name (from a variable or input box)
  5. New Email to buddy
  6. Attach /tmp/thenameyouused.docx
  7. Send email
  8. Quit Word

You don't have to delete the file in /tmp as they're auto-deleted over time.

And yes, this is more complicated than just pasting docx, but I was trying to offer a workaround for whatever limitation it is that KM has with docx.

-rob.

1 Like

Wouldn't it be faster and easier to use an Execute Shell script action to invoke the command "textutil"? The two file types he is asking about are handled by that utility.

2 Likes

Yep, that'd do the trick then :). (I don't use textutil very much at all.) Excellent alternative!

-rob.

1 Like

I will look into textutil and @griffman 's solution. thank you both

@Airy @griffman

There are some things that textutil doesn’t handle: as the name suggests, it doesn’t convert any embedded images or graphics. There are the usual issues over the formatting of tables, equations, and other special blocks of text

The point of my post was handling images. Thank you anyways for the idea.

Sorry. I should have investigated more thoroughly.

1 Like

no problem. Thanks for giving my problem some thought.