net_user Posted June 12, 2009 Share Posted June 12, 2009 every day i get a word document via email and i have to save the attachment to a network location.is it possible, (using the outlook rules, batch file, vbs file, ) to automatically save the attachment to a folder?keep in mind that the attachment's name changes every day. example...today's file is called 06112009.doc Link to comment Share on other sites More sharing options...
net_user Posted June 15, 2009 Author Share Posted June 15, 2009 (edited) nevermind...i figured it out.i created a macro in outlook and here is the codenow keep in mind the line of code Set TopFolder = MAPI.Folders.Item("Mailbox - Name of Person") the part "Mailbox - Name of Person" has to look like it does in outlook.and i have a folder called Attachments (not a subfolder of the inbox)Sub attach()Set MAPI = Outlook.GetNamespace("MAPI")Set TopFolder = MAPI.Folders.Item("Mailbox - Name of Person")Set InboxFolder = TopFolder.Folders.Item("Attachments")For Each myItem In InboxFolder.Items For Each att In myItem.Attachments att.SaveAsFile "C:\attachments\" & att.FileName myItem.Delete NextNextEnd Sub Edited June 15, 2009 by net_user Link to comment Share on other sites More sharing options...
cybpsych Posted July 8, 2009 Share Posted July 8, 2009 curious:1) can this work on exchange?2) can this apply to specific sender? (i don't want all mails in my inbox to be stripped ) Link to comment Share on other sites More sharing options...
net_user Posted July 23, 2009 Author Share Posted July 23, 2009 curious:1) can this work on exchange?2) can this apply to specific sender? (i don't want all mails in my inbox to be stripped )1.yes, i'm using this in an exchange environment.2. yes, set up a outlook rule to move emails to a specific folder, and have the vb code run for that specific folder. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now