How to create a macro on a Mac that opens and does a SavesAs on all files in a folder?

Anonymous
2023-01-18T01:39:42+00:00

I have several hundred Word files that need to be opened, saved in .odt format, then re-opened and saved in .docx (This eliminates an error message I get every time I open the files). I have very limited experience coding in VBA, so I am not sure how to structure the macro. I would be grateful for your help in automating this process through the use of a macro.

Thank you.

Microsoft 365 and Office | Word | For home | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

16 answers

Sort by: Most helpful
  1. Anonymous
    2023-01-19T16:34:46+00:00

    Yes! That worked. So what would it look like to put it all together? Meaning, the macro would take each .docx file and save it as .odt. Then open the new .odt file and save it back to a .docx.

    Thank you!

    Chip

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2023-01-18T22:20:50+00:00

    Thanks John. Do you have any insight into why the Macro still isn't working?

    Was this answer helpful?

    0 comments No comments
  3. John Korchok 237.1K Reputation points Volunteer Moderator
    2023-01-18T20:36:49+00:00

    Snow Lu revised their listing to correct the slashes (in the line that has bold text). You would have gotten an error message if PowerPoint hadn't been able to process the path, so there isn't a problem there.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-01-18T20:26:02+00:00

    John,

    Thanks for the reply. I didn’t see which line has the slash reversed. Can you be more specific?

    I am running the most current version of Word that comes with the office 365 subscription. I didn’t get any compile errors when I tried to run Snow’s macro on my Mac. That said, it did not perform the routines as expected.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2023-01-18T19:15:41+00:00

    Snow,

    I cut and pasted the Macro you posted and put it into Word on my Mac and ran it. There were no compile error on the front end. It did seem to go through all the files in the folder, but it only processed the .pdfs for some reason. It didn't appear to do anything to the docx or out files.

    Chip

    Was this answer helpful?

    0 comments No comments