Syntax
MAPIQuerySubject(Subject$)
Remarks
Returns the subject text of the current inbound message.
Argument | Explanation |
Subject$ | The subject text, limited to 256 characters. (Messages saved with MAPISaveMail are not limited to 256 characters.) An empty string ("") indicates no subject text. |
Example
The following example displays the subject of the first message in the Inbox.
Sub MAIN MAPI_LOGON_UI = 1 Session = MAPILogon(0, "", "", MAPI_LOGON_UI, 0) Dim MessageID$, Subject$ result = MAPIFindNext(Session, 0, "", "", 0, 0, MessageID$) MAPI_ENVELOPE_ONLY = 64 MAPI_PEEK = 128 Flags = MAPI_ENVELOPE_ONLY + MAPI_PEEK result = MAPIReadMail(Session, 0, MessageID$, Flags, 0) result = MAPIQuerySubject(Subject$) MsgBox Subject$ result = MAPILogoff(Session, 0, 0, 0) End Sub