經過打開本地空白文件的方式從而打開Office辦公軟件shell
const shell = require('electron').shell; const path = require('path'); shell.openItem(path.join(__dirname, 'new.docx'));
備註:這種方式只是用來測試打開本地Office文件,若是應用正式打包以後,需經過註冊表方式進行打開指定Office軟件。electron