Reputation: 616
I've been developping an office web addin-in with Word 2016 & VSCode (node.js template with yeoman)
I'm looking for a way to specify a document when starting the debugging like it is possible to set with Visual Studio's office addin (How to make Office Add-in (Apps for Office) in Visual Studio to open a template file instead of a new workbook?). In visual studio, it's a property of the .csproj.user file : <OfficeAppStartDocument>myproject\mydoc.docx</OfficeAppStartDocument>
Searching through the office-addin-debugging tool documentation, I haven't found anything yet.
Thanks
Upvotes: 0
Views: 2705
Reputation: 41
It is not supported by the current version office-addin-debugging (4.1.6).
I checked the code in office-addin-debugging. It reads from a template office file in node_modules\office-addin-dev-settings\templates. This template office file (e.g. ExcelWorkbookWithTaskPane.xlsx) has some manifest xml information. The extension code replaces this information with your add-in xml information, such as Id and version, and then outputs to a new office file (e.g Excel add-in 05a62159-5ecd-42b7-b302-641656dcb776.xlsx). The new office file is then launched and attached to the debugger.
To use an existing excel file, that excel file must have the similar initial addin manifest xml information that can be searched and replaced by the extension. I haven't found a way to insert this info into an excel file.
A workaround (sort of) is to copy the content of your existing excel file into the new file VSC created. You can then debug that file with your excel content. But you can't save it. Once saved, the xml information will be lost and that saved file cannot be used in VSC office-addin-debugging.
Upvotes: 0
Reputation: 1301
That's not an available feature, but I guess you could add a command to the script in your package.json to open an office document.
E.g: "start:desktop": "office-addin-debugging start manifest.xml desktop && start path-to-your-office-document.docx"
Edit; start
command on windows is used to open office documents from command line
Upvotes: 1