Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2016, 08:45 PM
gmayor's Avatar
gmayor gmayor is offline Downloading attachments Windows 10 Downloading attachments Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

In that case change the following



Code:
For j = olItem.Attachments.Count To 1 Step -1
            Set olAttach = olItem.Attachments(j)
            If Not olAttach.FileName Like "image*.*" Then
                strFname = olAttach.FileName
                strExt = Right(strFname, Len(strFname) - InStrRev(strFname, Chr(46)))
                'strFname = FileNameUnique(strSaveFldr, strFname, strExt)
                If Not FileExists(strSaveFldr & strFname) Then
                    olAttach.SaveAsFile strSaveFldr & strFname
                End If
                'olAttach.Delete        'delete the attachment
            End If
        Next j
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Tags
vba code



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shortcut for downloading attachments in e-mail paik1002 Outlook 4 12-11-2015 03:01 AM
emails in Outlook not downloading Jeff Peterson Outlook 0 05-08-2013 10:25 PM
Downloading & saving templates for my son msaylor Word 2 05-29-2012 05:00 PM
Downloading attachments Downloading Office 2007 whynot Office 4 01-05-2011 02:25 PM
Problem downloading Tiffany Office 0 11-06-2005 09:26 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft