Laufzettel, sendungsdetails

This commit is contained in:
2026-04-23 16:01:03 +02:00
parent dbde7e8c13
commit 475ea4e425
2 changed files with 21 additions and 7 deletions

View File

@@ -448,7 +448,12 @@ Public Class frmLaufzettel
End If
For Each p In paths
Mail.Attachments.Add(p, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, , "Gestellungsliste.pdf")
If p <> "" Then
Dim fileInfo As New IO.FileInfo(p)
If Not fileInfo.Exists Then Continue For
Mail.Attachments.Add(p, Microsoft.Office.Interop.Outlook.OlAttachmentType.olByValue, , "Gestellungsliste.pdf")
End If
Next
@@ -508,7 +513,13 @@ Public Class frmLaufzettel
Try
For Each p In paths
VERAG_PROG_ALLGEMEIN.cFormularManager.PrintViaSpirePDF({p}, cboPrinter.SelectedItem.ToString)
If p <> "" Then
If Not System.IO.Directory.Exists(p) Then Continue For
Dim fileInfo As New IO.FileInfo(p)
If Not fileInfo.Exists Then Continue For
VERAG_PROG_ALLGEMEIN.cFormularManager.PrintViaSpirePDF({p}, cboPrinter.SelectedItem.ToString)
End If
Next
'If paths.Count = 1 Then '1 Gestellungsliste
@@ -526,16 +537,18 @@ Public Class frmLaufzettel
Catch ex As Exception
MsgBox("Fehler beim erstellen der E-Mail:" & vbNewLine & ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, )
End Try
Else
Dim path = SDL.FormularManagerNEU.LaufzettelZollDE(AvisoID, False,, digitalDruck)
If path <> "" Then
'Process.Start(path)
VERAG_PROG_ALLGEMEIN.cFormularManager.PrintViaSpirePDF({path}, cboPrinter.SelectedItem.ToString)
Dim fileInfo As New IO.FileInfo(path)
If fileInfo.Exists Then
'Process.Start(path)
VERAG_PROG_ALLGEMEIN.cFormularManager.PrintViaSpirePDF({path}, cboPrinter.SelectedItem.ToString)
End If
End If
End If
If cbxDokumenteDrucken.Checked Then