Home > Software engineering >  Catching "move to explorer" event from Outlook
Catching "move to explorer" event from Outlook

Time:01-06

Recently I have written small tool (vb.net WinForms) for our company that creates structure and archives all Emails that are in x, y Folder in Outlook. This tool then renames and converts these .msg files to .eml files.

Now it would be perfect, if these Emails would automatically convert themself when user places it directly in the destination in Windows-Explorer folder per Drag and Drop. For that I assume I would have to run script/programm whenever Event X (moving Email from Outlook to explorer) occurs.

Has anyone an idea if catching that event would be possible? Or maybe any better ideas? I thought of some scripts that run on server and check for new files (once daily for example), but the first solution is more appearing to me.

CodePudding user response:

You can catch the Items.ItemAdd event on the folder to track and convert new items.

CodePudding user response:

The Outlook object model doesn't provide any events when items are saved to a folder by dragging and dropping items. You can use a file system watcher to track folder changes, see VBA monitor folder for new files for more information.

  •  Tags:  
  • Related