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

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -