- Operating System: Windows or MacOSX
- MS Word (preferably desktop version)
- Node JS (preferably v12 as it is the latest LTS)
-
Clone the project using HTTPS or SSH.
$ git clone https://github.com/accordproject/cicero-word-add-in.git
-
Setup the project by running the command
npm run setup
It will install the dependencies and set up the git hooks.
Alternatively, one can also use
npm i
to install the depedencies andnpm run prepare
to setup the git hooks. -
Firing up the server diverge a little depending upon the OS you're using.
- On Windows: Run
npm start
and it will start the server and automatically sideload the the add-in on the desktop version of MS Word. - On MacOSX: Run
npm run dev-server
for starting the server and runnpm start
to sideload the add-in.
- On Windows: Run
-
To test your add-in on the web, run
npm run start:web
and this will start the server. You can then sideload the add-in on the web version of MS Word by following the steps given here. -
Once the add-in is successfully loaded, the icon for add-in will be displayed on the Home tab. Go there and click the button with name "Cicero Word Add-in".
-
For more information on setting up Word add-in for development, follow this documentation.
-
Web version: Open the browser's developer tools and see the console's output.
-
Desktop version
- Windows: Download the developer tool
separately. Once you are able to start the server and sideload the add-in,
you will see "Accord Project" as an option in the tool.
- Mac:
- Open a terminal and run the following 4 commands (this is a one-time setup step).
defaults write com.microsoft.Word OfficeWebAddinDeveloperExtras -bool true defaults write com.microsoft.Excel OfficeWebAddinDeveloperExtras -bool true defaults write com.microsoft.Powerpoint OfficeWebAddinDeveloperExtras -bool true defaults write com.microsoft.Outlook OfficeWebAddinDeveloperExtras -bool true
- Sideload your add-in and open it in Word for Mac.
- Right click inside your add-in and choose "Inspect Element".
- The Safari Web Inspector console will automatically open, where you can
debug the add-in the same way you would debug a web app. (ie. use the
Console
tab to view printed logs and errors, theElement
tab to inspect the HTML and CSS, theNetwork
tab for network calls, etc).
- Windows: Download the developer tool
separately. Once you are able to start the server and sideload the add-in,
you will see "Accord Project" as an option in the tool.
If the above method to debug the add-in is not working, one can try the following steps:
- Delete the
C:\Users\{username}\.office-addin-dev-certs
folder. - Run
npx office-addin-dev-certs install
. - Now, run
npm run start
to start-up the server and sideload the add-in. - Click on Add-in to open it.
- Instead of attaching the debugger from add-in, open VS Code and click on
Run and Debug
( shortcut key on Windows: Ctrl+Shift+D ). Click on the green arrow in top left corner that saysStart Debugging
. The debugger is now running. Open the debug console. Happy debugging :).
We'd love for you to help develop improvements to Cicero Word Add-in! Please refer to the Accord Project Development guidelines we'd like you to follow.