vba - How to filter items sendername from Items_ItemAdd Events? -
private withevents items outlook.items private sub application_startup() dim ns outlook.namespace dim folder outlook.mapifolder set ns = application.getnamespace("mapi") set folder = ns.getdefaultfolder(olfolderinbox) set items = folder.items end sub private sub items_itemadd(byval item object) if typeof item outlook.mailitem printattachments item end if end sub i made rule outlook automatically print incoming email attachment, exception of few coworkers'email. if stop rule macro not working on own(supposing should,code error?) if rule's enabled every email attachment printed twice. one every page , 1 first page. there way work around this? kindly assist , in advance! work items.restrict method (outlook) exclude senders name. filtering items example private withevents items outlook.items private sub application_startup() dim olns outlook.namespace dim inbox outlook.mapifolder dim filter string filter = ...