Solved

Outlook Office 365 Exchange Server

Posted on 2016-08-18
5
31 Views
Last Modified: 2016-10-13
I had this question after viewing Outlook exchange Office 365 - Add a Subfolder to a "non'Default Folder".

I tried this code to move a folder from my main exchange folder to a subfolder in my archive folder


    Dim objOL As Outlook.Application
    Dim objNS As Outlook.NameSpace
    Dim objFolder As Outlook.MAPIFolder
    Dim olParentFolder As Outlook.MAPIFolder
    Dim olMovetoFolder As Outlook.MAPIFolder

    Dim CellValue1 As String, CellValue2 As String, CellValue3 As String
    Dim MoveTo1 As String, MoveTo2 As String
   
    Set objOL = CreateObject("outlook.application")
    Set objNS = objOL.GetNamespace("MAPI")

    CellValue1 = "roger@eaglepromanagement.com"
    CellValue2 = "projects"
    CellValue3 = "TestFolder"
    MoveTo1 = "Online Archive - roger@eaglepromanagement.com"
    MoveTo2 = "projects"

    Set olParentFolder = objNS.Folders(CellValue1).Folders(CellValue2).Folders(CellValue3)
    Set olMovetoFolder = objNS.Folders(MoveTo1).Folders(MoveTo2)
   
    olParentFolder.MoveTo olMovetoFolder
   

It gives me an error message (see attached screenshot)
C--Users-Roger-Downloads-Capture.JPG
0
Comment
Question by:rogerdjr
  • 2
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
Derek Schauland earned 500 total points
ID: 41797877
What permissions do you have on the source folder and the destination folder?
1
 

Assisted Solution

by:rogerdjr
rogerdjr earned 0 total points
ID: 41798160
I should have thought of that!!!!

Adjusted permissions (See Attached) and it works fine
C--Users-Roger-Documents-Main-Outloo.JPG
C--Users-Roger-Documents-Archive-Out.JPG
0
 
LVL 9

Expert Comment

by:Derek Schauland
ID: 41798171
Glad you got things moving again
0
 

Author Comment

by:rogerdjr
ID: 41798172
I should have thought of permissions - that was the issue.

Thanks
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question