From a73c3dabe6e81703a47c00f5beef0ff98cbb0394 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Fri, 15 Nov 2024 09:03:55 +0100 Subject: [PATCH] ids --- VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb b/VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb index 032cdada..bad4f0ac 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cIDS.vb @@ -4,6 +4,7 @@ Imports System.IO Imports System.Net Imports System.Reflection Imports System.Windows.Forms +Imports com.sun.tools.corba.se.idl.constExpr Imports com.sun.xml.internal.ws.api.pipe Imports javax.print.attribute.standard Imports Microsoft.Office.Interop @@ -506,11 +507,12 @@ Public Class cIDSInvoice - Shared Function isMail_IDS(mailItem As Outlook.MailItem) As Boolean + 'Shared Function isMail_IDS(mailItem As Outlook.MailItem) As Boolean + Shared Function isMail_IDS(html As String) As Boolean Try - If mailItem IsNot Nothing Then + If html IsNot Nothing Then Dim srch As String = "https://admin.unifiedpost.com/umadmin/viewDoc?doc=" - Return mailItem.HTMLBody.ToString.Contains(srch) + Return html.Contains(srch) End If Catch ex As Exception VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name) @@ -521,13 +523,14 @@ Public Class cIDSInvoice - Shared Function getPDF_IDS(ByRef mailItem As Outlook.MailItem, ByRef filename As String, ByRef targetpath As String) As Boolean + 'Shared Function getPDF_IDS(ByRef mailItem As Outlook.MailItem, ByRef filename As String, ByRef targetpath As String) As Boolean + Shared Function getPDF_IDS(ByRef htmlText As String, ByRef filename As String, ByRef targetpath As String) As Boolean Try - If mailItem Is Nothing Then Return False + If htmlText Is Nothing Then Return False - Dim html = mailItem.HTMLBody + Dim html = htmlText Dim srch As String = "https://admin.unifiedpost.com/" If html.ToString.Contains(srch) Then