Word with TypeScript SSO
You can use the Yeoman Generator to create a Word Add-in project using VS Code with TypeScript SSO
The link above displays the contents of these three files:
package.json
webpack.config.js
manifest.xml
This page displays all the other important files in this project:
.ENV
src/helpers/fallbackauthdialog.html
src/helpers/fallbackauthdialog.ts
src/helpers/fallbackauthhelper.ts
src/helpers/ssoauthhelper.ts
src/taskpane/taskpane.html
src/taskpane/taskpane.ts
src/commands/commands.html
src/commands/commands.ts
babel.config.json
tsconfig.json
.ENV
fallbackauthdialog.html
fallbackauthdialog.ts
fallbackauthhelper.ts
ssoauthhelper.ts
taskpane.html
taskpane.ts
commands.html
commands.ts
babel.config.json
tsconfig.json
function writeDataToWord(result) {
return Word.run(function (context) {
let data = [];
let userProfileInfo = filterUserProfileInfo(result);
for (let i = 0; i < userProfileInfo.length; i++) {
if (userProfileInfo[i] !== null) {
data.push(userProfileInfo[i]);
}
}
const documentBody = context.document.body;
for (let i = 0; i < data.length; i++) {
if (data[i] !== null) {
documentBody.insertParagraph(data[i], "End");
}
}
return context.sync();
});
}
© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext