Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordMacro

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Source revision
0eef6a5756b9 with working tree changes

Represents a single macro module within a document.

Inheritance

  • object
  • WordMacro

Remarks

Instances are returned by WordDocument.Macros, including host document and designer modules. Standard and class modules can be removed individually using WordMacro.Remove. Use WordDocument.RemoveMacros to remove the entire VBA project.

Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Methods

public void Remove() #

Removes this standard or class module from the document.

Exceptions

  • NotSupportedException – The module belongs to the host document or a designer.

Properties

public string Name { get; } #

Gets the macro module name.