I do not have Outlook here, so there is an air code.
Sub DoIt() Recurse ActiveExplorer.CurrentFolder ' select relevant folder in Outlook first End Sub Sub Recurse(f as MAPIFolder) Dim sf As MAPIFolder PrintPdf For Each sf In f.Folders ' open a potential sub-tree of folders, and move down one folder in the UI SendKeys "{RIGHT}{PAUSE 100}{DOWN}" Recurse sf Next f End Sub Sub PrintPdf() ' open the context menu, go down 4 entries, press enter, wait 10 seconds SendKeys "{APP}{PAUSE 100}{DOWN 4}{ENTER}{PAUSE 10000}" End Sub
I don't know if this will work, it's just an idea. Make sure that Outlook is in the foreground at runtime (by assigning the DoIt() routine to the user toolbar button). The start folder must be selected before starting.
source share