B bernie321 New member Joined Mar 31, 2006 Messages 1 Programming Experience 5-10 Mar 31, 2006 #1 Hi As part of an addin we need to either get or time the editing time of an email, from when it is created to when it is sent. I have no idea how to do this, any help would be much appreciated. Thanks B
Hi As part of an addin we need to either get or time the editing time of an email, from when it is created to when it is sent. I have no idea how to do this, any help would be much appreciated. Thanks B
B bbrnx19 New member Joined Sep 16, 2006 Messages 1 Programming Experience Beginner Sep 16, 2006 #2 bernie321 This may give you a starting point Sub EditingTime()Dim NameSpace As NameSpace Dim SentMail As MAPIFolderDim Item As ObjectSet NameSpace = GetNamespace("MAPI")Set SentMail = NameSpace.GetDefaultFolder(olFolderSentMail)For Each Item In SentMail.ItemsTimeCreated = Format(Item.CreationTime, "dd/mm/yyyy-hh:nn:ss")SentTime = Format(Item.SentOn, "dd/mm/yyyy-hh:nn:ss")Duration = Format(Item.CreationTime - Item.SentOn, "hh:nn:ss") Debug.Print " Created Time:"; TimeCreatedDebug.Print " Sent Time:"; SentTimeDebug.Print " Duration:"; DurationNext Set NameSpace = Nothing Set SentMail = Nothing End Sub Upvote 0 Downvote
bernie321 This may give you a starting point Sub EditingTime()Dim NameSpace As NameSpace Dim SentMail As MAPIFolderDim Item As ObjectSet NameSpace = GetNamespace("MAPI")Set SentMail = NameSpace.GetDefaultFolder(olFolderSentMail)For Each Item In SentMail.ItemsTimeCreated = Format(Item.CreationTime, "dd/mm/yyyy-hh:nn:ss")SentTime = Format(Item.SentOn, "dd/mm/yyyy-hh:nn:ss")Duration = Format(Item.CreationTime - Item.SentOn, "hh:nn:ss") Debug.Print " Created Time:"; TimeCreatedDebug.Print " Sent Time:"; SentTimeDebug.Print " Duration:"; DurationNext Set NameSpace = Nothing Set SentMail = Nothing End Sub