Outlook 2003 - 收到日期&移动电子邮件时,时间正在重置 [英] Outlook 2003 - Received Date & Time is being reset when E-Mail is moved
问题描述
我已在3个不同的论坛中提出这个问题,并且在3天内没有一个回复!当然有人可以提供帮助!!!
如果我使用命令"MyEMail.Move MyDest"其中MyEMail被定义为"MailItem"。和MyDest作为"MAPIFolder",电子邮件从我的INBOX移动到目标文件夹,正如我想要的那样,但收到的日期&时间设置为执行Move命令的时间,我丢失了原始日期和时间。电子邮件在INBOX中的时间......这是正常的吗?
我可以防止这种情况发生吗?我想保留最初收到的详细信息...
我编写的这个程序是我在最近的重建中丢失的程序的替代品,因为我没有将源代码复制到我的数据磁盘,我不记得我在原始程序中使用的方法,但我知道我从来没有遇到过这个问题!!!
任何帮助都将非常感谢!!!
I have asked this question in 3 different forums and haven't had a single reply in 3 days !!! Surely somebody can help !!!
If I use the command "MyEMail.Move MyDest" where MyEMail is defined as a "MailItem" and MyDest as a "MAPIFolder", the E-Mail moves from my INBOX to the Destination folder, as I want it to, but the Received Date & Time is set to the time of the execution of the Move command, and I lose the original Date & Time as it was when the E-Mail was in the INBOX ... is this normal ?
Can I prevent this from happening ? I'd like to keep the original Received details ...
This program I've written is a replacement for a program that I lost in a recent rebuild, as I hadn't copied the source to my data disk, and I can't remember the method that I used in the original program, but I know I never had this problem !!!
Any help would be greatly appreciated !!!
推荐答案
请尝试下面的代码供你查询,我试着搬进我的邮箱和它的工作。
Sub SubAllItemsFrom(istrRoot As String,istrSourceFolderName As String,istrDestinationFolderName As String)
'''''''''''''''''''''' '''''''''''''''''''''''istrRoot ="个人文件夹"
'istrSourceFolderName =" Temp"
'istrDestinationFolderName ="Temp1","MoveAllItemsFrom","个人文件夹","Temp","Temp1","",""," '''''''''''''''''''''''''''''))))))))))))))))))))))))))))))))))))))))))))))));;;;;;;;;;;;;;;;;;;;;;;;;;; myFolder As Outlook.Folder
Dim mySource As Outlook.Folder
Dim myDesti As Outlook.Folder
On On Error Resume Next
Set C olStores = Application.Session.Stores
为每个oStore在colStores中设置oRoot = oStore.GetRootFolder
如果oRoot.Name = istrRoot那么
'''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''' (istrSourceFolderName)然后设置mySource = myFolder
如果UCase(myFolder.Name)= UCase(istrDestinationFolderName)然后设置myDesti = myFolder
下一个
''''''''''' '''''''''''''''''结束如果
下一页
''''''''''' ''''''''''''''''''''''''''''''''''''''''''对于每个iMailItems in mySource.Items
iMailItems.Move myDesti
Next
'''''''''''''''''''''''''' ''''''''''终止子
Hi,
Please try below code for you query, i had try to move in my mail box and its working.
Sub MoveAllItemsFrom(istrRoot As String, istrSourceFolderName As String, istrDestinationFolderName As String)
'''''''''''''''''''''''''''''''''''
''' for example
'istrRoot = "Personal Folders"
'istrSourceFolderName = "Temp"
'istrDestinationFolderName = "Temp1"
'MoveAllItemsFrom "Personal Folders","Temp","Temp1"
'''''''''''''''''''''''''''''''''''
Dim colStores As Outlook.Stores
Dim oStore As Outlook.Store
Dim oRoot As Outlook.Folder
Dim myFolder As Outlook.Folder
Dim mySource As Outlook.Folder
Dim myDesti As Outlook.Folder
On Error Resume Next
Set colStores = Application.Session.Stores
For Each oStore In colStores
Set oRoot = oStore.GetRootFolder
If oRoot.Name = istrRoot Then
'''''''''''''''''''''''''''''''''''
For Each myFolder In oRoot.folders
If UCase(myFolder.Name) = UCase(istrSourceFolderName) Then Set mySource = myFolder
If UCase(myFolder.Name) = UCase(istrDestinationFolderName) Then Set myDesti = myFolder
Next
'''''''''''''''''''''''''''''''''''
End If
Next
'''''''''''''''''''''''''''''''''''
Dim iMailItems As MailItem
For Each iMailItems In mySource.Items
iMailItems.Move myDesti
Next
'''''''''''''''''''''''''''''''''''
End Sub
这篇关于Outlook 2003 - 收到日期&移动电子邮件时,时间正在重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!