Outlook VBA macro to move from archive folder to Inbox folder -
I am in the condition described in this thread
My source folders (Enterprise Vault) sub folder.
"Do main folder \ subfolder 1 \ subfolder 2 \ subfolder 3 \ SOURCEFOLDER"
Target folder my "inbox"
How do I sub-folders specified? I was getting an error below and, I have a noob in VBA.
as new Outlook.Application dim olNameSpace as Outlook.NameSpace'm retarded Outlook.MAPIFolder retarded olApp sub MoveToFolder () as dim olArcFolder OlCompFolder in Outlook.MAPIFolder Dim Melboksonamstring as In Outlook as string dim myInspectors. MailItem dim as myCopiedInspectors integer as Outlook.MailItem dim M as Outlook.MailItem dim myItem set integer as dim Icount olNameSpace = olApp.GetNamespace ( "MAPI") Set OlApp.GetNamespace ( "Mapi"). GetDefaultFolder (olFolderInbox) .Parent.Folders ("according to") set olArcFolder = olNameSpace.Folders ("stored on email computer"). Folder ( "Main folder \ Subfolder1 \ Subfolder2 \ Subfolder3 \ SOURCEFOLDER") # #set olArcFolder = olNameSpace.Folders ( "e-mail" stored on the computer). Set folder ("main folder \ subfolder1 \ subfolder2 \ subfolder3 \ sOURCEFOLDER") olCompFolder = olNameSpace.Folders ("stored on email computer"). Set myItem = olArcFolder.items (m) to y = 1 for the folder ("inbox"), set myInspectors = Outlook.Application.ActiveInspector.CurrentItem set myItem = olArcFolder.items (m) to myCopiedInspectors = myInspectors.copy myCopiedInspectors.Move olCompFolder myInspectors.Close olDiscard Next M End Sub
but Try
set olArcFolder = _ olNameSpace.Folders ("stored on email computer"). Folder ( "Main folder \ Subfolder1 \ Subfolder2 \ Subfolder3 \ SOURCEFOLDER")
set olArcFolder = _ olNameSpace.Folders ( "e-mail on a computer Archived "). Folder ("main folder" folders "(" subfolder 3 "). Folder (" source folder ")
Comments
Post a Comment