new
This commit is contained in:
@@ -163,11 +163,14 @@ Public Class cProgramFunctions
|
||||
Dim filename As String = ""
|
||||
If optFileName <> "" Then
|
||||
filename = sPath & optFileName & ".xlsx"
|
||||
If IO.File.Exists(filename) Then
|
||||
While IO.File.Exists(filename)
|
||||
filename = sPath & optFileName & Now.ToString("ddMMyyyyHHmmss") & ".xlsx"
|
||||
End If
|
||||
End While
|
||||
Else
|
||||
filename = sPath & "tmp_" & Now.ToString("ddMMyyyyHHmmss") & ".xlsx"
|
||||
While IO.File.Exists(filename)
|
||||
filename = sPath & "tmp_" & Now.ToString("ddMMyyyyHHmmss") & ".xlsx"
|
||||
End While
|
||||
End If
|
||||
|
||||
wb.SaveAs(filename)
|
||||
@@ -242,8 +245,8 @@ Public Class cProgramFunctions
|
||||
|
||||
|
||||
If anhaenge IsNot Nothing Then
|
||||
For Each a In DirectCast(anhaenge, List(Of String))
|
||||
If a IsNot Nothing AndAlso a <> "" Then Msg.Attachments.Add(New System.Net.Mail.Attachment(a))
|
||||
For Each aa In DirectCast(anhaenge, List(Of String))
|
||||
If aa IsNot Nothing AndAlso aa <> "" Then Msg.Attachments.Add(New System.Net.Mail.Attachment(aa))
|
||||
Next
|
||||
End If
|
||||
mySmtpsvr.Send(Msg)
|
||||
|
||||
Reference in New Issue
Block a user