Forum Discussion

angelhearted's avatar
angelhearted
New Contributor
6 years ago
Solved

TC12, Outlook16 - select folder does not work

Hello Need to set current selected folder in Outlook 16 (and 13). The folder is a subfolder of Inbox. With TC11 I could do it the following way (JScript):   var folder = 'TestFolder'; var folde...
  • angelhearted's avatar
    6 years ago

    We've figured out ourselves how to implement that in TC12.

     

     
    outlook.GetNamespace('MAPI').DefaultStore.GetRootFolder().Folders.Item(folder);
    outlook.Application.ActiveExplorer().SelectFolder(folder);
    const currentView = outlook.Application.ActiveExplorer().CurrentFolder.CurrentView;
    currentView.Reset();
    currentView.Apply();

    Hope it will save time for somebody.