vb.net - Auto-save attachments in Outlook 2010 -


my goal able save attachments specific email address folder locally. have created vb script reason doesn't work.

public sub saveattachtodisk (itm outlook.mailitem) dim objatt outlook.attachment dim savefolder string dim dateformat dateformat = format(now, "dd-mm-yyyy h-mm") savefolder = "c:\temp\"     each objatt in itm.attachments                 objatt.saveasfile savefolder & "\" & dateformate & objatt.displayname                 set objatt = nothing         next end sub 

i've tried created new module , new rule run script when message arrives specific address. have tried put script in "thisoutlooksession" nothing works.

did try run script manually under debugger?

try choose drive. c: drive requires admin privileges writing.

you may find getting started vba in outlook 2010 article helpful.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

php - Mongodb connectivity error -