Powershell combine set of word docx into 1 file



hi,

i looking combine files in folder.

these word documents.  docx

so far have - 


get-childitem -path "c:\users\plw\desktop\documents" -recurse |?{ ! $_.psiscontainer } |?{($_.name).contains(".docx")} |
 %{ out-file -filepath c:\users\plw\desktop\output\  -inputobject (get-content $_.fullname) -append}

please advise - how can combine docx in folder 1 file.

thank you

hi,

besides jrv's suggestion, @ below article, provide way merge mulitiple documents 1 document.

https://blogs.technet.microsoft.com/heyscriptingguy/2005/05/03/how-can-i-insert-files-into-a-word-document/

hope helps.

best regards,

elaine


please remember mark replies answers if , unmark them if provide no help. if have feedback technet subscriber support, contact tnmff@microsoft.com.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Edit Group Policy

Hyper-V VM not reaching OS 'Logon' screen

DNS question...