# Copying the contents of one or more word document into another word document

**URL:** <https://forums.powershell.org/t/copying-the-contents-of-one-or-more-word-document-into-another-word-document/12860>\
**Category:** PowerShell Help\
**Created:** [July 12, 2019, 11:36am UTC](https://forums.powershell.org/t/copying-the-contents-of-one-or-more-word-document-into-another-word-document/12860 "2019-07-12T11:36:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgoel](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@mgoel](https://forums.powershell.org/u/mgoel)\
**Post date:** [July 12, 2019, 11:36am UTC](https://forums.powershell.org/t/copying-the-contents-of-one-or-more-word-document-into-another-word-document/12860/1 "2019-07-12T11:36:42Z")

</div>

Hi,

&nbsp;

I am trying to use the following command:

gc 03.docx | sc c:\Test\04.docx

&nbsp;

but when it creates the file 04.docx, it can’t be opened by Microsoft Word. Please help.

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [July 12, 2019, 11:38am UTC](https://forums.powershell.org/t/copying-the-contents-of-one-or-more-word-document-into-another-word-document/12860/2 "2019-07-12T11:38:39Z")

</div>

What are you trying to achieve here. If your intend is to change extension, you should use Rename-Item cmdlet.

Get-Help Rename-Item -Online

btwn, just changing the extension doesn’t make doc to docx, i believe.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 12, 2019, 11:39am UTC](https://forums.powershell.org/t/copying-the-contents-of-one-or-more-word-document-into-another-word-document/12860/3 "2019-07-12T11:39:55Z")

</div>

Please format your code as code using the code tag button (pre) provided. Thanks.

Why don’t you simply copy the complete file?

```
Copy-Item -Path 03.docx -Destination c:\Test\04.docx
```

---

<div class="post-metadata">

**Author:** ![an0nemus](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@an0nemus](https://forums.powershell.org/u/an0nemus)\
**Post date:** [July 12, 2019, 2:45pm UTC](https://forums.powershell.org/t/copying-the-contents-of-one-or-more-word-document-into-another-word-document/12860/4 "2019-07-12T14:45:12Z")

</div>

So, docx is format file (not plain text), for a ‘test’ go ahead and do get-content 03.docx. What you’ll notice is a LOT of gibberish to the screen.

If you want to save multiple .docx files to a new docx file, you’re going to need to be able to read the document properly first. There are some conversations of doing this online.

> **[How to convert a word document to other formats using PowerShell](https://docs.microsoft.com/en-us/archive/blogs/bshukla/how-to-convert-a-word-document-to-other-formats-using-powershell)**

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:32pm UTC](https://forums.powershell.org/t/copying-the-contents-of-one-or-more-word-document-into-another-word-document/12860/5 "2024-05-16T20:32:01Z")

</div>


