Solved

Outlook Office 365 Exchange Server

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

Integrate social media with email signatures

Is your company active on social media? Do you also use email signatures? Including social media icons in your email signature is a great way to get fans for free. Let all your email users know you’re on social media quickly and easily, in a single click.

Join & Write a Comment

Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
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: …

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now