Saving email to file system as .msg does not give received date attribute in Windows Explorer
Hi, we are implementing a file based archiving system for email rather than going down the Enterprise Vault route. However when saving emails off Outlook onto the file system and displaying the received date attribute in Windows Explorer no date is displayed. I'm of the opinion that this data is not being attached to the msg file when it is saved - is there a way to do this, otherwise what is the point of all the email attributes in Windows 7/2008 if they can't be populated? Many thanks Rhys
August 11th, 2010 4:30pm

If you look in the internet headers of the message, you can see the received date there.
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2010 4:42pm

Thanks for your reply Andy The received date is there in Outlook but the problem is getting the received date attribute to display in Windows Explorer so it can be searched and sorted on. Getting the attribute to save with the msg is the issue.
August 11th, 2010 4:50pm

This may be a limitation of the saving as a file rather than with the complete message intact. You may want to look at some utilties to see if they can help. http://www.slipstick.com/mail1/savefs.asp#tools I would also post this in an Outlook forum as this is really an Outlook question, not an Exchange one. http://social.technet.microsoft.com/Forums/en/outlook/threads
Free Windows Admin Tool Kit Click here and download it now
August 11th, 2010 5:38pm

Hi, we are implementing a file based archiving system for email rather than going down the Enterprise Vault route. However when saving emails off Outlook onto the file system and displaying the received date attribute in Windows Explorer no date is displayed. I'm of the opinion that this data is not being attached to the msg file when it is saved - is there a way to do this, otherwise what is the point of all the email attributes in Windows 7/2008 if they can't be populated? Many thanks Rhys This is normal. The custom attributes of the msg file such as "Receive from" do not have any values, unless You manually fill in the information. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Thanks
August 13th, 2010 6:14am

I haven't done it with .msg files but I've used Poweshell to parse file content and update file metatdata based on the content for other file types. I don't see any reason it wouldn't work for .msg files too.[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2010 2:18pm

Thanks for replies and to mjolinor for possible way of doing this but as I need users to move the emails to their file archives themselves I don't think it's workable. The answer as Gen Lin posts above is that this is not possible but would like to see MS carry the attributes from email system to file system in the future as this would make archiving to the file system far easier.
August 13th, 2010 2:32pm

I think the real solution is to use an Exchange aware archiving system that keeps the message itself intact.
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2010 3:36pm

I had the same problem. But succeeded in writing a VBA macro using a freeware DOS utility in it to change file date. See my code below. To use it, select the emails you want to save to a particular folder and run this code. It asks you for a path to folder you want to save it in and then saves the msg files and changes the file date to original received date. I am not good with folder creation yet. SO make sure that the folder you want to save in exists. Trying to test & create if not existing did not work properly for me. Enjoy! Please download Filetouch.exe from softpedia freeware. Just google it or Bing it as our MS MVPs may like you to. Sub Save_Messages() Dim dtDate As Date Dim sName As String Dim sFile As String Dim sExt As String Dim Param As String Dim newName As String Dim msg As Variant Dim strFolderName As String strFolderName = InputBox(Prompt:="drive:\path", _ Title:="ENTER full path for saving emails", Default:="c:\temp\messages") If strFolderName = "drive:\path" Or strFolderName = vbNullString Then Exit Sub Else If Len(strFolderName) > 0 Then ' Do something with the selected folder For Each msg In Application.ActiveExplorer.Selection dtDate = msg.ReceivedTime sName = "From_" + msg.SenderName + "_" sName = sName + msg.Subject sName = Replace(sName, "/", sChr) sName = Replace(sName, "\", sChr) sName = Replace(sName, ":", sChr) sName = Replace(sName, "?", sChr) sName = Replace(sName, Chr(34), sChr) sName = Replace(sName, "<", sChr) sName = Replace(sName, ">", sChr) sName = Replace(sName, "|", sChr) sName = Format(dtDate, "yyyy-mm-dd", vbUseSystemDayOfWeek, _ vbUseSystem) & Format(dtDate, "-hhnn", _ vbUseSystemDayOfWeek, vbUseSystem) & "-" & sName sName = strFolderName + "\" + sName 'newName = sName + ".msg" sName = sName + ".msg" msg.SaveAs sName, olMSG Param = "c:\temp\filetouch " + """" & sName & """" + Format(dtDate, " mm/dd/yy") + " -cma" Open "c:\temp\messages\ChangeFileDate.bat" For Output As #1 Print #1, Param Close #1 RetVal = Shell("c:\temp\messages\ChangeFileDate.bat", 1) 'Name sName As newName Next Else 'No folder chosen, or user canceled MsgBox ("No folder selected") End If End If End Sub
June 14th, 2011 9:10pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics