sammelrechnungsdruck, ustva, etc.

This commit is contained in:
2025-03-03 16:09:02 +01:00
parent 051cf0fce7
commit 2c906976cb
20 changed files with 2360 additions and 431 deletions

View File

@@ -7,12 +7,68 @@ Imports System.Windows.Forms
Imports ClosedXML.Excel
Imports Microsoft.Office.Interop
Imports ThoughtWorks.QRCode.Codec
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
Public Class cProgramFunctions
Shared SQL As New VERAG_PROG_ALLGEMEIN.SQL
Public Shared Function getdefaultOutlookAccount(outlookApp As Outlook.Application) As Outlook.Account
' Get the MAPI namespace
Dim outlookNamespace As Outlook.NameSpace = outlookApp.GetNamespace("MAPI")
' Get the default store (default email account)
Dim defaultStore As Outlook.Store = outlookNamespace.DefaultStore
' Find the corresponding account
Dim defaultAccount As Outlook.Account = Nothing
For Each acc As Outlook.Account In outlookNamespace.Accounts
If acc.DeliveryStore.StoreID = defaultStore.StoreID Then
defaultAccount = acc
Exit For
End If
Next
Return defaultAccount
End Function
Public Shared Function printdefaultOutlookAccount(outlookApp As Outlook.Application) As String
' Get the MAPI namespace
Dim outlookNamespace As Outlook.NameSpace = outlookApp.GetNamespace("MAPI")
' Get the default store (default email account)
Dim defaultStore As Outlook.Store = outlookNamespace.DefaultStore
' Find the corresponding account
Dim defaultAccount As Outlook.Account = Nothing
For Each acc As Outlook.Account In outlookNamespace.Accounts
If acc.DeliveryStore.StoreID = defaultStore.StoreID Then
defaultAccount = acc
Exit For
End If
Next
' Display the default email account
If defaultAccount IsNot Nothing Then
Return "Default Email Account: " & defaultAccount.DisplayName
Else
Return "Default email account not found."
End If
End Function
Public Shared Function fktEuro(varBetrag As Object, varVonWährung As Object, varNachWährung As Object) As Object
'(FixeTaxe, "ATS", RECHNUNG.Währungscode)
'Dim varVonWährung As Object