MSMAPI, COM interface constants for VB.Net / VBScript

MSMAPI - interface constants

     This page contains simple VBA include for the MSMAPI COM library.

library parameters

File NameWINDOWS\system32\MSMAPI32.OCX
Guid{20C62CAE-15DA-101B-B9A8-444553540000}
Enums7

DeleteConstants

enum, 3 members.
  'Constants for Delete
Public Enum DeleteConstants

  'Delete current message
  mapMessageDelete = 0  '&H0

  'Fill compose buffer as FORWARD
  mapRecipientDelete = 1  '&H1

  'Delete current message
  mapAttachmentDelete = 2  '&H2
End Enum

MessagesActionConstants

enum, 15 members.
  'Constants for Messages control Action property.
Public Enum MessagesActionConstants

  'Creates a message set from selected messages in the Inbox.
  mapFetch = 1  '&H1

  'Shows the Send dialog for composing and sending a message.
  mapSendDialog = 2  '&H2

  'Sends the message currently in the Compose buffer.
  mapSend = 3  '&H3

  'Saves the message currently in the compose buffer (with MsgIndex = -1).
  mapSave = 4  '&H4

  'Copies the currently indexed message to the compose buffer.
  mapCopy = 5  '&H5

  'Composes a message.
  mapCompose = 6  '&H6

  'Replies to a message.
  mapReply = 7  '&H7

  'Replies to all message recipients.
  mapReplyAll = 8  '&H8

  'Forwards a message.
  mapForward = 9  '&H9

  'Deletes the currently indexed message.
  mapDelete = 10  '&HA

  'Shows the Address Book.
  mapShowAddressBook = 11  '&HB

  'Shows details about the currently indexed recipient.
  mapShowRecipDetails = 12  '&HC

  'Resolves the name of the currently indexed recipient.
  mapResolveName = 13  '&HD

  'Deletes the currently indexed recipient.
  mapDeleteRecip = 14  '&HE

  'Deletes the currently indexed attachment.
  mapDeleteAttachment = 15  '&HF
End Enum

MAPIErrors

enum, 36 members.
  'MAPI Error Codes
Public Enum MAPIErrors

  'Command completed successfully
  mapSuccessSuccess = 32000  '&H7D00

  'User aborted previous action
  mapUserAbort = 32001  '&H7D01

  'Unspecified Failure has occurred
  mapFailure = 32002  '&H7D02

  'Login failure
  mapLoginFail = 32003  '&H7D03

  'Disk full
  mapDiskFull = 32004  '&H7D04

  'Insufficient memory
  mapInsufficientMem = 32005  '&H7D05

  'Access denied
  mapAccessDenied = 32006  '&H7D06

  'General Failure
  mapGeneralFailure = 32007  '&H7D07

  'Too many sessions
  mapTooManySessions = 32008  '&H7D08

  'Too many files
  mapTooManyFiles = 32009  '&H7D09

  'Too many recipients
  mapTooManyRecipients = 32010  '&H7D0A

  'Attachment not found
  mapAttachmentNotFound = 32011  '&H7D0B

  'Attachment open failure
  mapAttachmentOpenFailure = 32012  '&H7D0C

  'Attachment write failure
  mapAttachmentWriteFailure = 32013  '&H7D0D

  'Unknown recipient
  mapUnknownRecipient = 32014  '&H7D0E

  'Bad recipient type
  mapBadRecipType = 32015  '&H7D0F

  'No message
  mapNoMessages = 32016  '&H7D10

  'Invalid message
  mapInvalidMessage = 32017  '&H7D11

  'Text too large
  mapTextTooLarge = 32018  '&H7D12

  'Invalid session
  mapInvalidSession = 32019  '&H7D13

  'Type not supported
  mapTypeNotSupported = 32020  '&H7D14

  'Ambiguous recipient
  mapAmbiguousRecipient = 32021  '&H7D15

  'Message in use
  mapMessageInUse = 32022  '&H7D16

  'Network failure
  mapNetworkFailure = 32023  '&H7D17

  'Invalid edit fields
  mapInvalidEditFields = 32024  '&H7D18

  'Invalid recipients
  mapInvalidRecips = 32025  '&H7D19

  'Current action not supported
  mapNotSupported = 32026  '&H7D1A

  'Session ID already exists
  mapSessionExist = 32050  '&H7D32

  'Read-only in read buffer
  mapInvalidBuffer = 32051  '&H7D33

  'Valid in compose buffer only
  mapInvalidReadBufferAction = 32052  '&H7D34

  'No valid session ID
  mapNoSession = 32053  '&H7D35

  'Originator information not available
  mapInvalidRecipient = 32054  '&H7D36

  'Action not valid in compose buffer
  mapInvalidComposeBufferAction = 32055  '&H7D37

  'Control failure
  mapControlFailure = 32056  '&H7D38

  'No recipients
  mapNoRecipients = 32057  '&H7D39

  'No attachments
  mapNoAttachment = 32058  '&H7D3A
End Enum

ErrorConstants

enum, 43 members.
  'Error Constants
Public Enum ErrorConstants

  'Out of memory
  mpeOutOfMemory = 7  '&H7

  'Error in loading MAPI DLL
  mpeErrorLoadingMAPI = 48  '&H30

  'Invalid property value
  mpeInvalidPropertyValue = 380  '&H17C

  'Invalid property array index
  mpeInvalidPropertyArrayIndex = 381  '&H17D

  'Property is read-only
  mpeSetNotSupported = 383  '&H17F

  'Property is write-only
  mpeGetNotSupported = 394  '&H18A

  'User cancelled process
  mpeUserCancelled = 32001  '&H7D01

  'Unspecified Failure has occurred
  mpeUnspecifiedFailure = 32002  '&H7D02

  'Login has failed
  mpeLoginFailed = 32003  '&H7D03

  'Disk is full
  mpeDiskFull = 32004  '&H7D04

  'Insufficient memory
  mpeInsufficientMemory = 32005  '&H7D05

  'Access denied
  mpeAccessDenied = 32006  '&H7D06

  'MAPI failure
  mpeMAPIFailure = 32007  '&H7D07

  'Too many sessions
  mpeTooManySessions = 32008  '&H7D08

  'Too many files
  mpeTooManyFiles = 32009  '&H7D09

  'Too many recipients
  mpeTooManyRecipients = 32010  '&H7D0A

  'Attachment not found
  mpeAttachmentNotFound = 32011  '&H7D0B

  'Failure on opening attachment
  mpeFailedOpeningAttachment = 32012  '&H7D0C

  'Failure attempting to write an attachment
  mpeFailedWritingAttachment = 32013  '&H7D0D

  'Unknown recipient
  mpeUnknownRecipient = 32014  '&H7D0E

  'Invalid recipient type
  mpeInvalidRecipientType = 32015  '&H7D0F

  'No messages
  mpeNoMessages = 32016  '&H7D10

  'Invalid message
  mpeInvalidMessage = 32017  '&H7D11

  'Text is too large
  mpeTextTooLarge = 32018  '&H7D12

  'Invalid session
  mpeInvalidSession = 32019  '&H7D13

  'Type not supported
  mpeTypeNotSupported = 32020  '&H7D14

  'Ambiguous recipient
  mpeAmbiguousRecipient = 32021  '&H7D15

  'Message in use
  mpeMessageInUse = 32022  '&H7D16

  'Network failure
  mpeNetworkFailure = 32023  '&H7D17

  'Invalid edit fields
  mpeInvalidEditFields = 32024  '&H7D18

  'Invalid recipients.
  mpeInvalidRecipients = 32025  '&H7D19

  'Not supported
  mpeNotSupported = 32026  '&H7D1A

  'The user has aborted the previous action
  mpeUserAbortedAction = 32027  '&H7D1B

  'A MAPI compliant messaging system is required. MAPI32.DLL couldn't be loaded.
  mpeMAPIMissing = 32048  '&H7D30

  'Logon failure: valid session ID already exists
  mpeLogonFailure = 32050  '&H7D32

  'Property is read only when not using compose buffer. Set MsgIndex = -1
  mpePropertyIsReadOnly = 32051  '&H7D33

  'Action only valid for compose buffer. Set MsgIndex = -1
  mpeInvalidAction = 32052  '&H7D34

  'MAPI Failure: valid session ID does not exist
  mpeNoValidSessionID = 32053  '&H7D35

  'No originator in the compose buffer
  mpeNoOriginator = 32054  '&H7D36

  'Action not valid for compose buffer
  mpeActionNotValid = 32055  '&H7D37

  'Cannot perform action, no messages in list
  mpeNoMessageList = 32056  '&H7D38

  'Cannot perform action, no recipients
  mpeNoRecipients = 32057  '&H7D39

  'Cannot perform action, no attachments
  mpeNoAttachments = 32058  '&H7D3A
End Enum

RecipTypeConstants

enum, 4 members.
  'Constants for RecipType Property
Public Enum RecipTypeConstants

  'Message originator
  mapOrigList = 0  '&H0

  'Recipient is a primary recipient
  mapToList = 1  '&H1

  'Recipient is a copy recipient
  mapCcList = 2  '&H2

  'Recipient is a blind copy recipient
  mapBccList = 3  '&H3
End Enum

AttachTypeConstants

enum, 3 members.
  'Constants for AttachType Property
Public Enum AttachTypeConstants

  'Attachment is a data file
  mapData = 0  '&H0

  'Attachment is an embedded OLE object
  mapEOLE = 1  '&H1

  'Attachment is a static OLE object
  mapSOLE = 2  '&H2
End Enum

SessionActionConstants

enum, 2 members.
  'Constants for Session control Action property.
Public Enum SessionActionConstants

  'Log user into account.
  mapSignOn = 1  '&H1

  'End messaging session.
  mapSignOff = 2  '&H2
End Enum
WUtils.com