I am using a script to process email messages. The usage is spreading and I now have a number of email boxes listed in a tree formation in my Outlook client. Part of the script operation is to move the completed messages into different folders. That has been okay while I only had one email box to worry about.
In Outlook, using CTRL+SHIFT+V opens the "Move Item to" window. My problem is that all the Mailboxes appear in the &Folders: pane within that window shown with their relevant sub folders as:
- Mailbox - My Mailbox
- - Inbox
- Completed
- - Inbox
- Completed
Within the "Move Item to" window, only the first character sent by the Send Character/Text command seems to be recognised. I thought declaring the different Mailbox names as variables should have worked but either it doesn't or I'm not doing it right. (

I have never attempted declaring variables before and this is what I came up with. (I have also tried different variations on this theme.) Needless to say, it didn't work:
Let>\\Mailbox - My Mailbox\Completed=Z
Send>Z
Further to this, is there a way to determine if a Mailbox tree is expanded or not? Left and Right arrow keys control expanding and collapsing trees but I dont know how to determine if a tree is already open.
I also tried renaming the destination folders using digits in front so that in My Mailbox, the "Completed" folder would show as "1-Completed". In a different Mailbox, the completed folder would show as "2-Completed", "3-Completed" and so on. Using Send>1 or Send>2 etc will locate the correct folder but only if the tree is expanded.
I would welcome any ideas or suggestions to help me learn this.
TIA.

J