Improve error message for outlook error
This commit is contained in:
parent
37e61b91f0
commit
645ca1b893
@ -120,22 +120,24 @@ Public Class ClassFileDrop
|
|||||||
'Sonderzeichen entfernen
|
'Sonderzeichen entfernen
|
||||||
subj = ClassFilehandle.InvalidCharacters(subj)
|
subj = ClassFilehandle.InvalidCharacters(subj)
|
||||||
'hardcode a destination path for testing
|
'hardcode a destination path for testing
|
||||||
Dim strFile As String = IO.Path.Combine(Path.GetTempPath, subj + ".msg")
|
Dim oFilename As String = IO.Path.Combine(Path.GetTempPath, subj + ".msg")
|
||||||
strFile = strFile.Replace("?", "")
|
oFilename = oFilename.Replace("?", "")
|
||||||
strFile = strFile.Replace("!", "")
|
oFilename = oFilename.Replace("!", "")
|
||||||
strFile = strFile.Replace("%", "")
|
oFilename = oFilename.Replace("%", "")
|
||||||
strFile = strFile.Replace("$", "")
|
oFilename = oFilename.Replace("$", "")
|
||||||
LOGGER.Info(">> Drop of msg - File:" & strFile)
|
LOGGER.Info(">> Drop of msg - File:" & oFilename)
|
||||||
Try
|
Try
|
||||||
myobj.SaveAs(strFile)
|
myobj.SaveAs(oFilename)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
MsgBox("Error in Save Email2Tempfile" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Die Email konnte aufgrund einer Sicherheitseinstellung im Outlook nicht abgelegt werden! " &
|
||||||
Return False
|
"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
|
End Try
|
||||||
|
|
||||||
ReDim Preserve files_dropped(i)
|
ReDim Preserve files_dropped(i)
|
||||||
files_dropped(i) = "|OUTLOOK_MESSAGE|" & strFile
|
files_dropped(i) = "|OUTLOOK_MESSAGE|" & oFilename
|
||||||
Next
|
Next
|
||||||
Return True
|
Return True
|
||||||
'Drop eines Outlook Attachments
|
'Drop eines Outlook Attachments
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user