You'll have to remove a part of the DOCM file that contains the macros. Here's a link to an example with a function (in C#) that will do the conversion.
It shouldn't be too difficult to convert that to PowerShell.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I have a shared business one drive (i am not the owner of it), with different folders and subfolders; in these folders and subfolders, I have different file types (Excel, PDF, images, word documents). To keep it short, we have .docm (having macros) documents that are causing us issues opening and editing online; there is no option to edit offline (since no access to Word offline, and we can't install third-party software on the system). So we need to convert all the .docm document files to .docx, these are in different folders. We need to replace all the original .docm files with the newer .docx file format so that the new .docm is in the same original file location. Can someone help me do this with a batch method (maybe through a script? However, you need to give me step-by-step instructions on what to do since I have never used these)? What I can do is download all the one drive folders, do the batch conversion offline and then re-upload it. I would appreciate all your help.
You'll have to remove a part of the DOCM file that contains the macros. Here's a link to an example with a function (in C#) that will do the conversion.
It shouldn't be too difficult to convert that to PowerShell.