Delete a VBA Module

Introduction

VBA modules in PowerPoint are used to automate tasks and add functionality that is not supported by the standard PowerPoint features. VBA allows you to write macros and create custom functions that can perform various operations, such as modifying slides, working with objects on a slide, managing animations, and much more. Use the folowing method to delete VBA modules.

DeleteVbaModule

API Information

API Type Description Resource
/slides/{name}/vbaProject/modules/{moduleIndex} DELETE Deletes a VBA module from a presentation saved in a storage. DeleteVbaModule

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file.
moduleIndex integer path true The 1-based index of a VBA module.
password string header false The password to open the presentation.
folder string query false The path to the folder containing the presentation file.
storage string query false The name of the storage contaning the folder.

Examples

In the default storage, the document MyPresentation.pptm contains a VBA project with three modules. Delete the second module.

The VBA modules

cURL Solution

SDK Solutions

The result:

The VBA modules

SDKs

Check Available SDKs to learn how to add an SDK to your project.