How does Office develop PPT plug-ins through VSTO?

0 Preface

  VSTO (Visual Studio Tools for Office) is an alternative to VBA and a set of Visual Studio toolkits for creating custom Office applications. VSTO can extend Office applications (such as Word, Excel, PPT) with Visual Basic or Visual C#. This article summarizes and records the development of PPT plug-ins through VSTO.

1. Tool preparation

  (1) Install Visual Studio
  Search for the "Visual Studio2022" installation package in Baidu and other browsers, and then install it.

  (2) Install VSTO
  Select the "Office/SharePoint Development" toolset in the Visual Studio Installer to install.
  insert image description here

2. PPT add-in creation and generation

  (1) New project
  insert image description here

  (2) Create a functional area
  insert image description here
  insert image description here

  (3) Add function button
  insert image description here

  (4) Realize the function code
  Double-click the button1 button and write the code:
  insert image description here

using System.Windows.Forms;
  
MessageBox.Show("Hello, PPTAddIns.");

3. Add-in program generation and use

  insert image description here

Reference materials:
[1] HiuMini. VSTO | Zero-based development of personal exclusive PPT navigation plug-in ; 2021-11-21 [accessed 2023-07-14].
[2] agrinJPG. VSTO development of Powerpoint plug-in ; 2022-03-14 [accessed 2023-07-14].
[3] Go with the flow~. VSTO Development Guide ; 2022-03-14 [accessed 2023-07-14].
[4] clareyang. VSTO secondary development PowerPoint: XML way to create Ribbon and Custom icon ; 2014-04-30 [accessed 2023-07-14].
[5] Vanling. VSTO secondary development PPT plug-in ; 2019-07-30 [accessed 2023-07-14].
[6]. VSTO Office Simple test of PowerPoint function in secondary development ; 2013-02-17 [accessed 2023-07-14].
[7] SanMaoSpace. Summary of commonly used APIs for VSTO PowerPoint (PPT) plug-in development ; 2019-08-02 [accessed 2023-07] -14].
[8] SanMaoSpace.VSTO Office secondary development PPTRibbonX command operation and object addition ; 2013-03-01 [accessed 2023-07-14].
[9] Running Forest. VSTO Office secondary development of PPT custom task pane test ; 2017-10 -10 [accessed 2023-07-14].

Guess you like

Origin blog.csdn.net/qq_40640910/article/details/131720690