locked
Create Folders and Subfolders Outlook 2016 HOW??? RRS feed

  • Question

  • Hi!

    I´m really desperate here. I´m no coding guy, just an IT-Manager. I have found a script that works and thats creating folders in users Outlook 2013/2016. But I really need helt to create subfolders under those folders I have allready created. Been googling my brains out and tested everything, but nothing works. Can someone please help me?

    Here is my code:

    $olFolderInbox = 6 
      
    $o = new-object -comobject outlook.application 
    $n = $o.GetNamespace("MAPI") 
     
    $f = $n.GetDefaultFolder($olFolderInbox)
    $nf = $f.Folders.Add("Testing") 

     
    $a = Release-Ref($nf) 
    $a = Release-Ref($f) 
    $a = Release-Ref($n) 
    $a = Release-Ref($o) 

    But how to create a subfolder under Testing?

    Thanks in advance.

    Thursday, November 16, 2017 1:02 PM

All replies