exporter powerpoint vers word en powershell

PowerPoint could not write to Microsoft Word

Finally, a definitive solution to the message PowerPoint could not write to Microsoft Word.

Indeed, there is a feature in PowerPoint that allows exporting a PowerPoint presentation to a new Word document, while keeping the links to the original slides.

This allows for a Word document that always reflects the content of the PowerPoint presentation.

Moreover, it is possible to automatically include the slide notes in the Word document.

exporting PowerPoint to Word with links
Exporting PowerPoint to Word with links

The screenshot below illustrates the result.

exporting Word via PowerPoint
Exporting Word via PowerPoint

Then, to have a Word document formatted with an automatic table of contents, you need to replace the « Slide 1, Slide 2, etc. » paragraph with the slide title and a ‘Title’ style.

This is obviously long and tedious.

Also, there’s no option to adjust the size or presentation of the linked slide in Word.

However, the worst part is that the feature almost inevitably stops in the middle of the export with the message PowerPoint could not write to Microsoft Word.

We won’t bore you with all the solutions we tried to solve this problem, without success: significant increase in memory and CPU, hardware change, Office or Windows configurations, complete reinstallation, startup mode change, reboot, etc., etc., etc…

Resolving the PowerPoint could not write to Microsoft Word message

We have written a PowerShell script that handles exporting a PowerPoint presentation to a Word document.

Moreover, this script is obviously modifiable to improve the output in Word.

PowerShell Script

The purpose of the PowerShell script is to export a PowerPoint file to a Word document and eliminate the « PowerPoint could not write to Microsoft Word » message.

First, it asks for the PowerPoint file path and automatically creates a new path for the Word document.

Next, it creates COM objects to interact with PowerPoint and Word.

Then, it opens the PowerPoint file.

The script creates a Word document and inserts a blank page at the beginning for a table of contents, which it configures with a depth of three levels.

Next, it iterates through each slide in the PowerPoint, extracts information like the slide title, and adds it to the Word document with an appropriate Title style.

Additionally, the script sets up a progress window to show the progress of the Word document creation process.

progress of the powerpoint to word export
progress of the powerpoint to word export

Free Download of the PowerShell Script

The script works and gets the job done.

However, COM objects can be finicky at times.

In particular, the PowerPoint window may remain open and blank. Just close it.

In Word, the first line will say: No table of contents entries found. This is normal because the table of contents is inserted before the titles are added, which are used to create the table of contents.

When the Word document generation is complete, just press F9 on this line to see the table of contents appear.

Finally, download the script that definitively solves the « PowerPoint could not write to Microsoft Word » message: pptx2docx.ps1

To learn more

Check out the French version of this article: PowerPoint n’a pas pu écrire dans Microsoft Word

Commentaires

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *