Access Accessing Read-Only Fields Of The MailItem OOM Object

Joined
Aug 12, 2008
Messages
1
Reaction score
0
I have an SQL Server database from a client that contains (among other data) email data from a proprietary software program. I need to convert the email data to Outlook *.msg files. I then need to "detach" the *.pst file and send it to the client. To properly construct the *.msg files, I need to be able to set several read-only properties including:
SenderName
SenderEmailAddress
ReceivedTime
SentOn
Sent
(probably others)

I tried creating a table with the same structure as one that gets created when exporting messages and then importing the data to Outlook that way. I was able to use the mileage field to store the primary key from the source database table so I could loop through the messages and add the applicable attachments as necessary. But using that method does not allow for the import/edit of the sent/received times. I tried adding custom properties to house those values and that works for viewing/sorting at the explorer level but the custom properties must be selected for view individually at the inspector level. The email address also does not auto-populate when hitting the reply button on a message created this way (even though the email address populates in the body as a header of the message being replied to in the new inspector that opens up after hitting reply).

It seems as though I can always get close to creating the messages the way I need them but can never exactly replicate a message that has been sent/received due to one or more of the above read-only fields. Either pertinent data or user functionality is sacrificed. Is there a work-around to populating the read-only fields of a MailItem, or a better way to do what I need to do?

Any help would be greatly appreciated!

Thanks!

Mavyak

p.s. Cross-posted here.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top