In earlier iterations of macOS I would use
open -a Finder.app <filename>
In Sonoma that is resulting in two of the following dialog boxes :
The application "Microsoft Word" can't be opened
-128
Note: the same document can be successfully opened directly from Finder.app by double clicking or hitting CMD-O . So Word is functioning properly and the document is intact.
I did look at some microsoft-learn pages and they do not address this scenario.
How to open a Microsoft Word document from the commandline in Sonoma?

open path/to/doc? Also see https://apple.stackexchange.com/questions/212583/how-to-open-files-in-another-app-via-terminal-on-macos – Tetsujin Jan 28 '24 at 18:12sonoma: it did not in earlier iterations ofmacOS. – WestCoastProjects Jan 28 '24 at 21:50