-
Notifications
You must be signed in to change notification settings - Fork 305
Update the Outlook + Teams sample to Office + Teams sample #1366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 6 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6efbc9e
update outlook sample to wxpo
hermanwenhe 41a4cce
update launch profile
hermanwenhe 09bec8d
rename folder
hermanwenhe b467536
fix
hermanwenhe 99fc163
restore env.local
hermanwenhe 7976e8f
update update date
hermanwenhe de978d0
fix CI
hermanwenhe 3ef76d2
add back env file
hermanwenhe 66aa5fe
fix: update readme
hermanwenhe b856857
Merge remote-tracking branch 'upstream/dev' into dev
hermanwenhe 9bc6787
Merge branch 'OfficeDev:dev' into dev
hermanwenhe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
32 changes: 31 additions & 1 deletion
32
...ab-and-outlook-add-in/.vscode/launch.json → ...tab-and-office-add-in/.vscode/launch.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
69 changes: 69 additions & 0 deletions
69
hello-world-teams-tab-and-office-add-in/add-in/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| { | ||
| "name": "office-addin-taskpane", | ||
| "version": "0.0.1", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/OfficeDev/Office-Addin-TaskPane.git" | ||
| }, | ||
| "license": "MIT", | ||
| "config": { | ||
| "app_to_debug": "excel", | ||
| "app_type_to_debug": "desktop", | ||
| "dev_server_port": 53000 | ||
| }, | ||
| "scripts": { | ||
| "build": "webpack --mode production", | ||
| "build:dev": "webpack --mode development", | ||
| "dev-server": "webpack serve --mode development", | ||
| "lint": "office-addin-lint check", | ||
| "lint:fix": "office-addin-lint fix", | ||
| "prettier": "office-addin-lint prettier", | ||
| "signin": "office-addin-dev-settings m365-account login", | ||
| "signout": "office-addin-dev-settings m365-account logout", | ||
| "start": "office-addin-debugging start ../appPackage/build/appPackage.local.zip", | ||
| "start:desktop": "office-addin-debugging start ../appPackage/build/appPackage.local.zip desktop", | ||
| "start:desktop:word": "office-addin-debugging start ../appPackage/build/appPackage.local.zip --app word", | ||
| "start:desktop:excel": "office-addin-debugging start ../appPackage/build/appPackage.local.zip --app excel", | ||
| "start:desktop:powerpoint": "office-addin-debugging start ../appPackage/build/appPackage.local.zip --app powerpoint", | ||
| "start:desktop:outlook": "office-addin-debugging start ../appPackage/build/appPackage.local.zip --app outlook", | ||
| "start:web": "office-addin-debugging start ../appPackage/build/appPackage.local.zip web", | ||
| "stop": "office-addin-debugging stop ../appPackage/build/manifest.local.json", | ||
| "validate": "office-addin-manifest validate ../appPackage/build/manifest.local.json", | ||
| "watch": "webpack --mode development --watch" | ||
| }, | ||
| "dependencies": { | ||
| "core-js": "^3.36.0", | ||
| "regenerator-runtime": "^0.14.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/core": "^7.24.0", | ||
| "@babel/preset-typescript": "^7.23.3", | ||
| "@types/office-js": "^1.0.377", | ||
| "@types/office-runtime": "^1.0.35", | ||
| "babel-loader": "^9.1.3", | ||
| "copy-webpack-plugin": "^12.0.2", | ||
| "eslint-plugin-office-addins": "^3.0.2", | ||
| "file-loader": "^6.2.0", | ||
| "html-loader": "^5.0.0", | ||
| "html-webpack-plugin": "^5.6.0", | ||
| "office-addin-cli": "^1.6.3", | ||
| "office-addin-debugging": "^5.1.4", | ||
| "office-addin-dev-certs": "^1.13.3", | ||
| "office-addin-lint": "^2.3.3", | ||
| "office-addin-manifest": "^1.13.4", | ||
| "office-addin-prettier-config": "^1.2.1", | ||
| "os-browserify": "^0.3.0", | ||
| "process": "^0.11.10", | ||
| "source-map-loader": "^5.0.0", | ||
| "ts-loader": "^9.5.1", | ||
| "typescript": "^5.4.2", | ||
| "webpack": "^5.90.3", | ||
| "webpack-cli": "^5.1.4", | ||
| "webpack-dev-server": "5.0.3" | ||
| }, | ||
| "prettier": "office-addin-prettier-config", | ||
| "browserslist": [ | ||
| "last 2 versions", | ||
| "ie 11" | ||
| ] | ||
| } |
File renamed without changes.
27 changes: 27 additions & 0 deletions
27
hello-world-teams-tab-and-office-add-in/add-in/src/commands/commands.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { insertBlueParagraphInWord } from "./word"; | ||
| import { setRangeColorInExcel } from "./excel"; | ||
| import { insertTextInPowerPoint } from "./powerpoint"; | ||
| import { setNotificationInOutlook } from "./outlook"; | ||
|
|
||
| /* global Office */ | ||
|
|
||
| // Register the add-in commands with the Office host application. | ||
| Office.onReady(async (info) => { | ||
| switch (info.host) { | ||
| case Office.HostType.Word: | ||
| Office.actions.associate("action", insertBlueParagraphInWord); | ||
| break; | ||
| case Office.HostType.Excel: | ||
| Office.actions.associate("action", setRangeColorInExcel); | ||
| break; | ||
| case Office.HostType.PowerPoint: | ||
| Office.actions.associate("action", insertTextInPowerPoint); | ||
| break; | ||
| case Office.HostType.Outlook: | ||
| Office.actions.associate("action", setNotificationInOutlook); | ||
| break; | ||
| default: { | ||
| throw new Error(`${info.host} not supported.`); | ||
| } | ||
| } | ||
| }); |
26 changes: 26 additions & 0 deletions
26
hello-world-teams-tab-and-office-add-in/add-in/src/commands/excel.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /* | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. | ||
| * See LICENSE in the project root for license information. | ||
| */ | ||
|
|
||
| /* global Office Excel console */ | ||
|
|
||
| /** | ||
| * Set range color to selected range in excel when the add-in command is executed. | ||
| * @param event | ||
| */ | ||
| export async function setRangeColorInExcel(event: Office.AddinCommands.Event) { | ||
| try { | ||
| await Excel.run(async (context) => { | ||
| const range = context.workbook.getSelectedRange(); | ||
| range.format.fill.color = "yellow"; | ||
| await context.sync(); | ||
| }); | ||
| } catch (error) { | ||
| // Note: In a production add-in, notify the user through your add-in's UI. | ||
| console.error(error); | ||
| } | ||
|
|
||
| // Be sure to indicate when the add-in command function is complete | ||
| event.completed(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note
The unified app manifest for Word, Excel, and PowerPoint is in preview. Visit this link to check the required Office Versions.