Save Outlook attachment VBA does not work properly -


i try run code, not save xml file given folder. wrong it?

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

from comment "changing security settings solved problem. had set macro settings enable macro." – vergab jul 28 @ 20:09


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -