You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/migrate-vsto-to-office-add-in-shared-code-library-tutorial.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: 'Tutorial: Share code between both a VSTO Add-in and an Office Add-in by using a shared code library'
3
3
description: Tutorial on how to share code between a VSTO Add-in and an Office Add-in.
4
-
ms.date: 02/07/2023
4
+
ms.date: 05/19/2025
5
5
ms.service: microsoft-365
6
6
ms.localizationpriority: high
7
7
---
@@ -36,14 +36,14 @@ Skills and techniques in this tutorial:
36
36
37
37
To set up your development environment:
38
38
39
-
1. Install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/).
39
+
1. Install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/).
40
40
1. Install the following workloads.
41
41
- ASP.NET and web development
42
42
- .NET Core cross-platform development
43
43
- Office/SharePoint development
44
44
- The following **Individual** components.
45
45
- Visual Studio Tools for Office (VSTO)
46
-
- .NET Core 3.0 Runtime
46
+
- .NET Core 9.0 Runtime
47
47
48
48
You also need the following:
49
49
@@ -57,25 +57,25 @@ This tutorial uses the [VSTO Add-in shared library for Office Add-in](https://gi
57
57
> [!NOTE]
58
58
> The sample uses C#, but you can apply the techniques in this tutorial to a VSTO Add-in written in any .NET language.
59
59
60
-
1. Download the [VSTO Add-in shared library for Office Add-in](https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/VSTO-shared-code-migration)PnP solution to a working folder on your computer.
61
-
1. Start Visual Studio 2019 and open the **/start/Cell-Analyzer.sln** solution.
60
+
1. Download the [VSTO Add-in shared library for Office Add-in](https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/VSTO-shared-code-migration)sample to a working folder on your computer.
61
+
1. Start Visual Studio and open the **/start/Cell-Analyzer.sln** solution.
62
62
1. On the **Debug** menu, choose **Start Debugging**.
63
63
64
-
The add-in is a custom task pane for Excel. You can select any cell with text, and then choose the **Show unicode** button. In the **Result** section, the add-in will display a list of each character in the text along with its corresponding Unicode number.
64
+
The add-in is a custom task pane for Excel. You can select any cell with text, and then choose the **Show unicode** button. In the **Result** section, the add-in displays a list of each character in the text along with its corresponding Unicode number.
65
65
66
66

67
67
68
68
## Analyze types of code in the VSTO Add-in
69
69
70
-
The first technique to apply is to analyze the add-in for which parts of code can be shared. In general, project will break down into three types of code.
70
+
The first technique to apply is to analyze the add-in for which parts of code can be shared. In general, the project breaks down into three types of code.
71
71
72
72
### UI code
73
73
74
-
UI code interacts with the user. In VSTO UI code works through Windows Forms. Office Add-ins use HTML, CSS, and JavaScript for UI. Because of these differences, you can't share UI code with the Office Add-in. UI will need to be recreated in JavaScript.
74
+
UI code interacts with the user. In VSTO UI code works through Windows Forms. Office Add-ins use HTML, CSS, and JavaScript for UI. Because of these differences, you can't share UI code with the Office Add-in. The UI needs to be recreated in JavaScript.
75
75
76
76
### Document code
77
77
78
-
In VSTO, code interacts with the document through .NET objects, such as `Microsoft.Office.Interop.Excel.Range`. However, Office Add-ins use the Office.js library. Although these are similar, they aren't exactly the same. So again, you can't share document interaction code with the Office Add-in.
78
+
In VSTO, code interacts with the document through .NET objects, such as `Microsoft.Office.Interop.Excel.Range`. However, Office Add-ins use the Office JavaScript library (also called Office.js). Although these are similar, they aren't exactly the same. So again, you can't share document interaction code with the Office Add-in.
0 commit comments