# Copy-Paste content from a Word file to a text file

**URL:** <https://forum.robotframework.org/t/copy-paste-content-from-a-word-file-to-a-text-file/7993>\
**Category:** Robot Framework\
**Created:** [22 October 2024 04:00 UTC](https://forum.robotframework.org/t/copy-paste-content-from-a-word-file-to-a-text-file/7993 "2024-10-22T04:00:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nseries73](https://avatars.discourse-cdn.com/v4/letter/n/ecae2f/32.png) [@nseries73](https://forum.robotframework.org/u/nseries73)\
**Post date:** [22 October 2024 04:00 UTC](https://forum.robotframework.org/t/copy-paste-content-from-a-word-file-to-a-text-file/7993/1 "2024-10-22T04:00:12Z")

</div>

Hi Everyone, nice to be here. I am new to automation and robot framework, I am using pycharm to code and I am stuck attempting to copy paste Word file content to a RTF field. I used Get File and Get Binary File but it pastes the content in a different format.  
So can someone help me copy-paste content from a Word file document with it’s formatting intact (such as indentation, bolds, italics, bullets and what not) on to a rich text field? I am expecting to get the same result as I would when I copy-paste manually from a Word file onto a rich text field (RTF)

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [22 October 2024 09:51 UTC](https://forum.robotframework.org/t/copy-paste-content-from-a-word-file-to-a-text-file/7993/2 "2024-10-22T09:51:37Z")

</div>

Hi Nirmalya,

MS word files are a proprietary format;

- Get File, will only return the text if the file is plain texts (not in this case)
- and Get Binary File, will return the binary data in a binary file but won’t decode it

I’m not sure if there’s a robot framework library that reads word documents or not?

There is the python [docx module](https://python-docx.readthedocs.io/en/latest/) that you could use to create a python keyword for reading the data from a document, but I believe it only supports docx files (Word 2007+), if that works for you.

Dave.
