Solved

Outlook Office 365 Exchange Server

Posted on 2016-08-18
5
34 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 (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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Adoption of Microsoft’s Enterprise Mobility and Security solution and Office 365 will re-order the File Sync and Share market Microsoft has stated that its Enterprise Mobility + Security (EMS) is the fastest growing product in the history of the …
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

685 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