Skip to content

Commit 404bfc6

Browse files
authored
[All Hosts] (vsto) refresh VSTO-Add-in code sharing article (#5178)
1 parent 192b18b commit 404bfc6

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/tutorials/migrate-vsto-to-office-add-in-shared-code-library-tutorial.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 'Tutorial: Share code between both a VSTO Add-in and an Office Add-in by using a shared code library'
33
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
55
ms.service: microsoft-365
66
ms.localizationpriority: high
77
---
@@ -36,14 +36,14 @@ Skills and techniques in this tutorial:
3636

3737
To set up your development environment:
3838

39-
1. Install [Visual Studio 2019](https://visualstudio.microsoft.com/downloads/).
39+
1. Install [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/).
4040
1. Install the following workloads.
4141
- ASP.NET and web development
4242
- .NET Core cross-platform development
4343
- Office/SharePoint development
4444
- The following **Individual** components.
4545
- Visual Studio Tools for Office (VSTO)
46-
- .NET Core 3.0 Runtime
46+
- .NET Core 9.0 Runtime
4747

4848
You also need the following:
4949

@@ -57,25 +57,25 @@ This tutorial uses the [VSTO Add-in shared library for Office Add-in](https://gi
5757
> [!NOTE]
5858
> The sample uses C#, but you can apply the techniques in this tutorial to a VSTO Add-in written in any .NET language.
5959
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.
6262
1. On the **Debug** menu, choose **Start Debugging**.
6363

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.
6565

6666
![The Cell Analyzer VSTO add-in running in Excel with the "Show unicode" button and empty Result section.](../images/pnp-cell-analyzer-vsto-add-in.png)
6767

6868
## Analyze types of code in the VSTO Add-in
6969

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.
7171

7272
### UI code
7373

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.
7575

7676
### Document code
7777

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.
7979

8080
### Logic code
8181

0 commit comments

Comments
 (0)