Subclass PowerPoint Window

The code snippet here demonstrates how to subclass PowerPoint's main window. The subclass window procedure gets messages from Windows instead of the subclassed window procedure. In our case, we get the messages intended for PowerPoint. The code snippet handles the window close message (generated when 'X' is clicked on the window) and terminates PowerPoint when this message arrives. All other messages are transmitted "as is" to the subclassed window.

Download

The code to subclass the PowerPoint window is included within a PowerPoint file. You can download the 16 kb PowerPoint file here.

Installation

After downloading the PowerPoint file, open it with PowerPoint and save it as a PowerPoint Addin (SubclassPowerPoint.ppa). Load this PowerPoint Addin (Tools | Add-Ins... | Add New...).

Caution

When this addin is active, PowerPoint will NOT prompt for saving any unsaved presentations. Use this addin with caution. You have been warned! 

Contact OfficeOne on email at officeone@officeoneonline.com. Copyright © 2001-2023 OfficeOne. All rights reserved.