Forum Discussion

Ivan54's avatar
Ivan54
Bronze Contributor
Mar 01, 2018
Solved

Outlook 2016 - save multiple attachments at once to network drive - not possible

Hi,

 

For the last couple of weeks we've noticed that we no longer can save multiple attachments at once to our network drive from within Outlook 2016 (Windows). We started to notice the issue with the version 1712 and it persists to 1801.

 

We can select to save all the attachments, then the Windows Explorer opens to select the destination, and when we click OK the Windows Explorer windows just closes and we're back at the Outlook popup with the attachments still selected but unsaved at the destination.

 

I've tried different users, with different computers and even different network drives (servers) just make sure.

 

Can anyone else please try this at their end, since getting proper help with Office 365 ProPlus applications is near impossible with Microsoft Support.

  • Dave Wilson's avatar
    Dave Wilson
    Copper Contributor
    It is now Sept 7th and we are still experiencing this issue. What do I need to do to make this go away? I'm on Version 1803 (Build 9126.2275 Click-To-Run) .

    Thanks.
    • Taylor Erickson's avatar
      Taylor Erickson
      Copper Contributor

      Check to make sure those impacted have their Office up to date. Our team had this issue prior to our current build of 1808 (10730.20088)

       

      I have spoken to a M$ rep and they have said that this should be fixed now with the live build.

      • Dave Wilson's avatar
        Dave Wilson
        Copper Contributor

        So, if we're running the Office 365 service, where does our Outlook update come from? I've tried running updates but I can't seem to get an update past 1803.

  • Danny Hofman's avatar
    Danny Hofman
    Copper Contributor

    Still wondering, is there still no official fix from Microsoft for this issue? I could find only the workaround that was updated in January 2018 

    • Michael Barr's avatar
      Michael Barr
      Copper Contributor

      Patrick, please share your solution.  As the bug has been present for more than half a year it seem Microsoft has no intention of fixing this.

      • Patrick van den Berg's avatar
        Patrick van den Berg
        Copper Contributor

        this is the vba code :

        you can adjust the inbox map print in this source in whatever you want.

        ================================================


        Option Explicit
        Dim WithEvents TargetFolderItems As Items

        Const FILE_PATH As String = "C:\Temp2\"  'you have to create this map on your c-drive

        'Private Declare Function ShellExecute Lib "shell32.dll" Alias _

        Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias _
        "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
        ByVal lpFile As String, ByVal lpParameters As String, _
        ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


        Private Sub Application_Startup()

            Dim olApp As Outlook.Application
            Dim objNS As Outlook.NameSpace
            Dim olFolder As Outlook.MAPIFolder
            Dim msg As Outlook.MailItem

            Set olApp = Outlook.Application
            Set objNS = olApp.GetNamespace("MAPI")
            Set olFolder = objNS.GetDefaultFolder(olFolderInbox)
            Set olFolder = olFolder.Folders("print") ' map inside the inbox

            Set TargetFolderItems = olFolder.Items

        End Sub


        Sub TargetFolderItems_ItemAdd(ByVal Item As Object)

        On Error Resume Next
            Dim colAtts As Outlook.Attachments
            Dim oAtt As Outlook.Attachment
            Dim sFile As String
            Dim sDirectory As String
            Dim sFileType As String

        Set colAtts = Item.Attachments

        If colAtts.Count Then
            For Each oAtt In colAtts


        Dim pos As Long
        pos = Len((oAtt.FileName)) - InStr(1, oAtt.FileName, ".", vbTextCompare) + 1

        sFileType = LCase$(Right$(oAtt.FileName, pos))

        Select Case sFileType

            Case ".prt"
                  
                    sFile = FILE_PATH & oAtt.FileName
                    sFile = Replace(sFile, " ", "")  ' remove spaces from file
                    oAtt.SaveAsFile sFile & ".doc"
                              

            Case ".xlsx", ".docx", ".pdf", ".doc", ".xls"
                   
                    sFile = FILE_PATH & oAtt.FileName
                    sFile = Replace(sFile, " ", "")
                    oAtt.SaveAsFile sFile
                
                    
            End Select
                Next
        End If

        End Sub


        Private Sub Application_Quit()

        Dim ns As Outlook.NameSpace
        Set TargetFolderItems = Nothing
        Set ns = Nothing

        End Sub

        ================ end vba code =============================
        this is the vbs script, you have to place inside the temp2 directory, see vba code above for directory
        ============= start of vbs script ==============================

        Dim objOffice, oWkbk, strFile


        If WScript.Arguments.Count = 0 Then
          ' no arguments passed from command line  
          WScript.Quit
        Else
          strFile = Wscript.Arguments(0)

          ' Print XLS document
          If (Right(strFile, 3) = "xls") Then
            Set objOffice = CreateObject("Excel.Application")
            objOffice.Visible = False
            Set oWkbk = objOffice.Workbooks.Open(strFile)
            oWkbk.PrintOut
            oWkbk.Close xlDoNotSaveChanges
            objOffice.Quit
          End If

         ' Print XLS document
          If (Right(strFile, 4) = "xlsx") Then
            Set objOffice = CreateObject("Excel.Application")
            objOffice.Visible = False
            Set oWkbk = objOffice.Workbooks.Open(strFile)
            oWkbk.PrintOut
            oWkbk.Close xlDoNotSaveChanges
            objOffice.Quit
          End If

          ' Print WORD document
          If (Right(strFile, 4) = "docx") Then
            Set objOffice = WScript.CreateObject("Word.Application")
            objOffice.Documents.Open strFile
            objOffice.ActiveDocument.PrintOut
            Wscript.Sleep(1000)
            objOffice.ActiveDocument.Close
            objOffice.Quit
          End If

        ' Print WORD document
          If (Right(strFile, 3) = "doc") Then
            Set objOffice = WScript.CreateObject("Word.Application")
           ' objOffice.Documents.Open strFile
            objOffice.Documents.Open strFile
            objOffice.ActiveDocument.PrintOut
            Wscript.Sleep(1000)
            objOffice.ActiveDocument.Close
            objOffice.Quit
          End If

        If (Right(strFile, 3) = "pdf") Then
            Set sh = CreateObject("WScript.Shell")
            sh.Run """Acrobat.exe"" /p /h"&strFile,,true
            Wscript.Sleep(1000)
          End If

        End If

         

        ====== end of vbs script==  put this file inside the temp2 dir ================

         

        the 3d file is a vb net application i wrote, if needed send me a p.m. , or you can make a cmd file yourself for executing the vbs script file.

         

        good luck

         

         

    • Antony Paul's avatar
      Antony Paul
      Copper Contributor

      Hi Patrick, I would love to see that code, especially if it makes use of a dialog box allowing the user to navigate to the network drive and folder of their choosing to save the attachments to.

       

      I can't believe MS haven't fixed this bug in over 5 months.

Resources