The IMessage::DeleteAttach method deletes an attachment.
See IMessage : IMAPIProp.
HRESULT DeleteAttach(
ULONG ulAttachmentNum,
ULONG ulUIParam,
LPMAPIPROGRESS lpProgress,
ULONG ulFlags
);
The IMessage::DeleteAttach method deletes an attachment from within a message.
A deleted attachment is not permanently deleted until the message's IMAPIProp::SaveChanges method has been called.
Before calling DeleteAttach, call the IUnknown::Release method for the attachment and each of its streams.
Because deleting an attachment can be a lengthy process, DeleteAttach provides the mechanism for displaying a progress indicator. You can request the display of a progress indicator by passing a pointer to your IMAPIProgress : IUnknown implementation or NULL if you do not have an implementation. You must also specify a window handle in the ulUIParam parameter and the ATTACH_DIALOG flag in the ulFlags parameter.