2

I am creating some part of a document that the user can then use for his own purposes. Currently, it is saved to desktop and automatically opened, meaning that the user has to copy the content, close it and delete it. I was wondering if there was a way to either

  • Directly copy the content of the document to clipboard without saving it (like document.copy())

  • If not possible, if I can at least open the document without having to save it so Users dont need to manually delete it.

Simply copying to clipboard as if it was a string doesn't do the job.

Edit: What I want to do would be:

from docx import Document

document = Document()
document.add_heading('Document Title', 0)
document.copy()
MonkeyPop
  • 21
  • 2

0 Answers0