Solved

Outlook Office 365 Exchange Server

Posted on 2016-08-18
5
37 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 9

Accepted Solution

by:
Derek Schauland (Microsoft MVP) 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
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

Ready to trade in that old firewall?

Whether you need to trade-up to a shiny new Firebox or just ready to upgrade from whatever appliance you're using now, WatchGuard has the right appliance for you! Find your perfect Firebox today with appliance sizing tool!

Question has a verified solution.

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

Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
In previous parts of this Nano Server deployment series, we learned how to create, deploy and configure Nano Server as a Hyper-V host. In this part, we will look for a clustering option. We will create a Hyper-V cluster of 3 Nano Server host nodes w…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

632 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