Thread: [Solved] Vault lock mail copy
View Single Post
Old 08-19-2013, 08:05 AM
fcarboni fcarboni is offline Windows Vista Office 2007
Join Date: Aug 2013
Posts: 2
fcarboni is on a distinguished road
Default Vault lock mail copy

My company from 1 week use Vault Enterprise, then I can't able to move my personal mail to an external pst folder.
Ialso tried with VBA code:
Sub bt1_Click() 
Dim olApp As New Outlook.Application
Dim olNameSpace As Outlook.Namespace
Dim FromFolder As Outlook.MAPIFolder
Dim ToFolder As Outlook.MAPIFolder
Dim FromSubFolder As Outlook.MAPIFolder
Dim ToSubFolder As Outlook.MAPIFolder
Dim mailboxNameString As String
Dim myInspectors As Outlook.MailItem
Dim myCopiedInspectors As Outlook.MailItem
Dim myItem As Outlook.MailItem
Dim M As Integer
Dim iCount As Integer
Set olNameSpace = olApp.GetNamespace("MAPI")
Set FromFolder = olNameSpace.GetDefaultFolder(olFolderInbox)
Set FromSubFolder = FromFolder.Folders("moveFrom")
Set ToFolder = olNameSpace.Folders("ArchivioPst_personal")
Set ToSubFolder = ToFolder.Folders("Posta_gestita")

For M = 1 To FromSubFolder.Items.Count
    Set myItem = FromSubFolder.Items(M)
    Set myInspectors = Outlook.Application.ActiveInspector.CurrentItem
    Set myCopiedInspectors = myInspectors.Copy
    myCopiedInspectors.Move ToSubFolder
    myInspectors.Close olDiscard
Next M
end sub
But i received this error:
Run-time error'-2147024891 (80070005)':

Some ideas to force this copy?!?!?
Reply With Quote