locked
Outlook folder and item differences RRS feed

  • Question

  • Hi guys.

    Please help me with understanding why in powershell i can get subfolders from outlook by

    $outlook = New-Object -comobject outlook.application
    $namespace = $outlook.GetNamespace("MAPI")
    $namespace.Folders.item(6).Folders.Item(2)

    but i cant by 

    $outlook = New-Object -comobject outlook.application
    $namespace = $outlook.GetNamespace("MAPI")
    $namespace.Folders[6].Folders[2]

    Second option outputs just nothing, no error, no warning, no output.

    Thanks in advance

    Wednesday, April 25, 2018 2:12 PM

All replies

  • Both work as expected.  What version of Outlook?


    \_(ツ)_/

    Wednesday, April 25, 2018 2:22 PM