PDA

View Full Version : Using MAPI from Access VB - no date in message



Sjefke
03-06-2007, 06:00 AM
In an MS Access application, I'm using this private type (as part of a class), Outlook Express 6.0 being the email client:


Private Type MAPIMessage
Reserved As Long
Subject As String
NoteText As String
MessageType As String
DateReceived As String
ConversationID As String
Originator As Long
Flags As Long
RecipCount As Long
Recipients As Long
FileCount As Long
Files As Long
End Type

It works great: email is composed in code, then placed in OE Outbox - perfect!

However, there is no date in the message-source, on sending. So, what happens when you forward a message that was composed via this function, is that for the 'sent' date, today's date is used (as opposed to the real date it was sent on - obviously, not what you want as it confuses me and the recipient).

I compared regular OE messages with the composed\VB ones, and it appears that the date field is missing in the header. I tried to use the 'DateReceived' field of the MapiMessage (by giving it some date), but it is not stored in the outgoing message, so it doesn't work.

Any suggestions?

Thanks!