Bugfix Öffnen von Msg in Anhänge (Sendungsdetails).

This commit is contained in:
2024-10-11 12:11:40 +02:00
parent f12c20c800
commit 0074a9c748
3 changed files with 18 additions and 9 deletions

View File

@@ -4154,13 +4154,18 @@ Public Class frmSendungsdetailsNEU
Dim docPath = VERAG_PROG_ALLGEMEIN.cDATENSERVER.GET_PDFPath_BY_DocID(dgvAnhang.SelectedRows(0).Cells("anh_docId").Value)
If Not IO.File.Exists(docPath) Then
If Not File.Exists(docPath) Then
MsgBox("Die Datei existiert nicht!")
Else
If docPath.ToString.ToLower.EndsWith(".msg") Then ' MSG - Mails --> lokale Kopie, sonst Fehler (bereits von Benutzer soUndSo geöffnet)
Dim docPathTMP = VERAG_PROG_ALLGEMEIN.cFormularManager.getTMPPath_MSG()
System.IO.File.Copy(docPath, docPathTMP)
Process.Start(docPathTMP)
Try
Dim docPathTMP = VERAG_PROG_ALLGEMEIN.cFormularManager.getTMPPath_MSG()
File.Copy(docPath, docPathTMP)
Process.Start(docPathTMP)
Catch ex As Exception
'wenn fehler, soll versucht werden, das oríginal zu öffnen.
Process.Start(docPath)
End Try
Else
Process.Start(docPath)
End If