A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Manually change 'Date Sent', 'Date received' in messages ... how ?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 21st 07, 02:47 PM posted to microsoft.public.outlook.program_vba
baxe0
external usenet poster
 
Posts: 2
Default Manually change 'Date Sent', 'Date received' in messages ... how ?

For uniformity reasons and to have better grip on my correspondence, I want
to store my messages, text, articles received not by internet but on paper in
Outlook after scanning/ OCR them.

I can create a new message from the scanned text. Of course I want to
timestamp these artificial Outlook messages properly, so I can retrieve/
categorize/ index them easily (e.g. with Windows Desktop Search).

Thus in must change 'Date Sent', 'Date received' manually in thes
'fake'messages.

Does any know a way or a program (Visual Basic) to do this. At present I do
not master Visual Basic so I can write it myself.

Erik

--
I always think hard before I say something stupid
Ads
  #2  
Old March 22nd 07, 06:11 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Manually change 'Date Sent', 'Date received' in messages ... how ?



Erik, you can do that manually with the Redemption from www.dimastr.com.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?...4&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Wed, 21 Mar 2007 07:47:18 -0700 schrieb baxe0:

For uniformity reasons and to have better grip on my correspondence, I

want
to store my messages, text, articles received not by internet but on paper

in
Outlook after scanning/ OCR them.

I can create a new message from the scanned text. Of course I want to
timestamp these artificial Outlook messages properly, so I can retrieve/
categorize/ index them easily (e.g. with Windows Desktop Search).

Thus in must change 'Date Sent', 'Date received' manually in thes
'fake'messages.

Does any know a way or a program (Visual Basic) to do this. At present I

do
not master Visual Basic so I can write it myself.

Erik

  #3  
Old September 15th 15, 01:02 PM
stevemanser stevemanser is offline
Junior Member
 
First recorded activity at Outlookbanter: Sep 2015
Posts: 1
Default

This is a script that I wrote that will run through a folder of .msg files and replace the email “Received Date” with the original date, because sometimes copying or moving an email using POP3 or IMAP will set a new creation date that Outlook will then display, so you get a mailbox full of emails that are the same date. You may need to change the "X-MDArrival-Date:" to whatever it is in your mail system. I’ve also packaged the VBA into an Access Database File he http://www.brightnet.co.uk/archives/1333


Private Sub ReplaceEmailReceivedDateWithDeliveryDate(strPath As Variant)
Const ForReading = 1
Const ForWriting = 2
Set objFSO = CreateObject("Scripting.FileSystemObject")
If IsNull(strPath) Then strPath = "C:\"
Set objFolder = objFSO.GetFolder(strPath)
For Each objFile In objFolder.Files
strFile = objFile.Name
If Right(strFile, 4) = ".msg" Then
strTemp = strFile & ".tmp"
'read existing file
Set objFile = objFSO.OpenTextFile(strPath & strFile, ForReading)
strText = objFile.ReadAll
objFile.Close
If InStr(strText, "X-MDArrival-Date:") Then
'make new file
Set tmpFile = objFSO.CreateTextFile(strPath & strTemp, True)
arrLines = Split(strText, vbCrLf)
For i = 0 To (UBound(arrLines))
If Left(arrLines(i), 17) = "X-MDArrival-Date:" Then
vLine1 = arrLines(i)
strDate1 = Mid(arrLines(i), 19)
End If
If Left(arrLines(i), 14) = "Delivery-Date:" Then
vLine2 = arrLines(i)
strDate2 = Mid(arrLines(i), 16)
End If
Next
If Not IsEmpty(vLine1) Then
For i = 0 To (UBound(arrLines))
If Left(arrLines(i), 17) = "X-MDArrival-Date:" Then
arrLines(i) = Replace(arrLines(i), vLine1, Replace(vLine2, "Delivery-Date:", "X-MDArrival-Date:"))
End If
If InStr(arrLines(i), strDate1) Then arrLines(i) = Replace(arrLines(i), strDate1, strDate2)
tmpFile.WriteLine arrLines(i)
Next
tmpFile.Close
objFSO.DeleteFile strPath & strFile, True
objFSO.MoveFile strPath & strTemp, strPath & strFile
End If
End If
End If
NextRow = NextRow + 1
Next objFile
End Sub
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calcualting the time between email received date and reply date Shanks Outlook - General Queries 3 February 22nd 07 03:11 AM
MailItem.Move changes Received Date Frank Perugini Outlook and VBA 1 January 21st 07 11:27 PM
MailItem.Move changes Received Date Frank Perugini Add-ins for Outlook 1 January 21st 07 11:27 PM
Incorrect Date showing as Received Date Sean Outlook - General Queries 0 December 27th 06 09:05 AM
Exporting Date received and Date Sent to Access Sugarthebeet Outlook - General Queries 1 January 19th 06 08:06 PM


All times are GMT +1. The time now is 04:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.