diff --git a/Global_Indexer/ClassFileDrop.vb b/Global_Indexer/ClassFileDrop.vb index f75f8a2..b89f09c 100644 --- a/Global_Indexer/ClassFileDrop.vb +++ b/Global_Indexer/ClassFileDrop.vb @@ -120,22 +120,24 @@ Public Class ClassFileDrop 'Sonderzeichen entfernen subj = ClassFilehandle.InvalidCharacters(subj) 'hardcode a destination path for testing - Dim strFile As String = IO.Path.Combine(Path.GetTempPath, subj + ".msg") - strFile = strFile.Replace("?", "") - strFile = strFile.Replace("!", "") - strFile = strFile.Replace("%", "") - strFile = strFile.Replace("$", "") - LOGGER.Info(">> Drop of msg - File:" & strFile) + Dim oFilename As String = IO.Path.Combine(Path.GetTempPath, subj + ".msg") + oFilename = oFilename.Replace("?", "") + oFilename = oFilename.Replace("!", "") + oFilename = oFilename.Replace("%", "") + oFilename = oFilename.Replace("$", "") + LOGGER.Info(">> Drop of msg - File:" & oFilename) Try - myobj.SaveAs(strFile) + myobj.SaveAs(oFilename) Catch ex As Exception LOGGER.Error(ex) - MsgBox("Error in Save Email2Tempfile" & vbNewLine & ex.Message, MsgBoxStyle.Critical) - Return False + MsgBox("Die Email konnte aufgrund einer Sicherheitseinstellung im Outlook nicht abgelegt werden! " & + "Bitte wenden Sie sich an Ihren Administrator, " & + "um den programmatischen Zugriff auf Outlook zuzulassen. " & + "Weitere Informationen finden Sie im Log.", MsgBoxStyle.Critical, "Global Indexer") End Try ReDim Preserve files_dropped(i) - files_dropped(i) = "|OUTLOOK_MESSAGE|" & strFile + files_dropped(i) = "|OUTLOOK_MESSAGE|" & oFilename Next Return True 'Drop eines Outlook Attachments