neu
This commit is contained in:
@@ -22,7 +22,7 @@ Imports System.Security
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'Die folgende GUID ist für die ID der typelib, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
<Assembly: Guid("07408492-d82f-4544-b9ef-001c408442a0")>
|
||||
<Assembly: Guid("07408492-d82f-4544-b9ef-001c408442a0")>
|
||||
|
||||
' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
'
|
||||
@@ -35,8 +35,8 @@ Imports System.Security
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.2")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.2")>
|
||||
<Assembly: AssemblyVersion("1.0.0.3")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.3")>
|
||||
|
||||
Friend Module DesignTimeConstants
|
||||
Public Const RibbonTypeSerializer As String = "Microsoft.VisualStudio.Tools.Office.Ribbon.Serialization.RibbonTypeCodeDomSerializer, Microsoft.VisualStudio.Tools.Office.Designer, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
|
||||
|
||||
2
VERAGAddIn/My Project/Resources.Designer.vb
generated
2
VERAGAddIn/My Project/Resources.Designer.vb
generated
@@ -22,7 +22,7 @@ Namespace My.Resources
|
||||
'''<summary>
|
||||
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
|
||||
6
VERAGAddIn/My Project/Settings.Designer.vb
generated
6
VERAGAddIn/My Project/Settings.Designer.vb
generated
@@ -14,21 +14,21 @@ Option Explicit On
|
||||
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0"), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "Funktion zum automatischen Speichern von My.Settings"
|
||||
#Region "Automatische My.Settings-Speicherfunktion"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Imports Microsoft.Office.Tools.Ribbon
|
||||
Imports System.Windows.Forms
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAGAddIn.ThisAddIn
|
||||
|
||||
Public Class VERAGRibbon
|
||||
Dim LOGIN_OK = False
|
||||
Public Shared Event bla()
|
||||
Private Sub CustomerRibbon_Load(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonUIEventArgs) Handles MyBase.Load
|
||||
|
||||
|
||||
End Sub
|
||||
Private Function CreateRibbonDropDownItem() As RibbonDropDownItem
|
||||
Return Me.Factory.CreateRibbonDropDownItem()
|
||||
End Function
|
||||
|
||||
Private Function CreateRibbonMenu() As RibbonMenu
|
||||
Return Me.Factory.CreateRibbonMenu()
|
||||
End Function
|
||||
|
||||
Private Function CreateRibbonButton() As RibbonButton
|
||||
Dim button As RibbonButton = Me.Factory.CreateRibbonButton()
|
||||
' AddHandler (button.Click), AddressOf Button_Click
|
||||
Return button
|
||||
End Function
|
||||
|
||||
Private Sub Ribbon1_Load(ByVal sender As System.Object, ByVal e As RibbonUIEventArgs) Handles MyBase.Load
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||
Dim ADMIN As New cADMIN
|
||||
LOGIN_OK = ADMIN.checkLogin("MAIL_USER", "VERAG_MAIL_USER_2017", "VERAG")
|
||||
' LOGIN_OK = ADMIN.checkLogin("MAIL_USER", "VERAG_MAIL_USER_2017", "ATILLA")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As RibbonControlEventArgs)
|
||||
'MsgBox("HI")
|
||||
' Dim ThisAddIn As New ThisAddIn
|
||||
Dim s As String = ""
|
||||
'Dim app = ThisAddIn.getapp()
|
||||
' ThisAddIn.PrintAPageFromEmail()
|
||||
RaiseEvent bla()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As RibbonControlEventArgs) Handles Button2.Click
|
||||
If LOGIN_OK Then
|
||||
' For Each ft As Form In My.Application.OpenForms
|
||||
'If ft.GetType.ToString = "AVISO.frmEintragAviso" Then
|
||||
'ft.BringToFront()
|
||||
' Exit Sub
|
||||
' End If
|
||||
' Next
|
||||
|
||||
|
||||
|
||||
Dim EingangsDatum As Date = CDate("01.01.1990")
|
||||
Try
|
||||
Dim explorer As Outlook.Explorer = Globals.ThisAddIn.Application.ActiveExplorer
|
||||
Dim selection As Outlook.Selection = explorer.Selection
|
||||
If selection.Count > 0 Then
|
||||
Dim selectedItem = selection(1)
|
||||
Dim mailItem As Outlook.MailItem = selectedItem
|
||||
If mailItem IsNot Nothing Then
|
||||
EingangsDatum = mailItem.ReceivedTime
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = 0
|
||||
Dim mainForm As New AVISO.frmEintragAviso
|
||||
If EingangsDatum > CDate("01.01.1990") Then
|
||||
mainForm.EingangsDatum = EingangsDatum
|
||||
End If
|
||||
mainForm.TopMost = True
|
||||
mainForm.StartFromOUTLOOK = True
|
||||
mainForm.Show()
|
||||
Else
|
||||
MsgBox("Fehler beim Login!")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
222
VERAGAddIn/ThisAddIn.Designer.vb
generated
222
VERAGAddIn/ThisAddIn.Designer.vb
generated
@@ -14,61 +14,61 @@ Option Explicit On
|
||||
|
||||
|
||||
'''
|
||||
<Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(0), _
|
||||
Global.System.Security.Permissions.PermissionSetAttribute(Global.System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
|
||||
<Microsoft.VisualStudio.Tools.Applications.Runtime.StartupObjectAttribute(0), _
|
||||
Global.System.Security.Permissions.PermissionSetAttribute(Global.System.Security.Permissions.SecurityAction.Demand, Name:="FullTrust")> _
|
||||
Partial Public NotInheritable Class ThisAddIn
|
||||
Inherits Microsoft.Office.Tools.Outlook.OutlookAddInBase
|
||||
|
||||
|
||||
Friend WithEvents CustomTaskPanes As Microsoft.Office.Tools.CustomTaskPaneCollection
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0")> _
|
||||
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")> _
|
||||
Friend WithEvents Application As Microsoft.Office.Interop.Outlook.Application
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Public Sub New(ByVal factory As Global.Microsoft.Office.Tools.Outlook.Factory, ByVal serviceProvider As Global.System.IServiceProvider)
|
||||
MyBase.New(factory, serviceProvider, "AddIn", "ThisAddIn")
|
||||
Globals.Factory = factory
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Protected Overrides Sub Initialize()
|
||||
MyBase.Initialize()
|
||||
MyBase.Initialize
|
||||
Me.Application = Me.GetHostItem(Of Microsoft.Office.Interop.Outlook.Application)(GetType(Microsoft.Office.Interop.Outlook.Application), "Application")
|
||||
Globals.ThisAddIn = Me
|
||||
Global.System.Windows.Forms.Application.EnableVisualStyles()
|
||||
Me.InitializeCachedData()
|
||||
Me.InitializeControls()
|
||||
Me.InitializeComponents()
|
||||
Me.InitializeData()
|
||||
Global.System.Windows.Forms.Application.EnableVisualStyles
|
||||
Me.InitializeCachedData
|
||||
Me.InitializeControls
|
||||
Me.InitializeComponents
|
||||
Me.InitializeData
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Protected Overrides Sub FinishInitialization()
|
||||
Me.OnStartup()
|
||||
Me.OnStartup
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Protected Overrides Sub InitializeDataBindings()
|
||||
Me.BeginInitialization()
|
||||
Me.BindToData()
|
||||
Me.EndInitialization()
|
||||
Me.BeginInitialization
|
||||
Me.BindToData
|
||||
Me.EndInitialization
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Private Sub InitializeCachedData()
|
||||
If (Me.DataHost Is Nothing) Then
|
||||
Return
|
||||
@@ -77,115 +77,115 @@ Partial Public NotInheritable Class ThisAddIn
|
||||
Me.DataHost.FillCachedData(Me)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Private Sub InitializeData()
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Private Sub BindToData()
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Sub StartCaching(ByVal MemberName As String)
|
||||
Me.DataHost.StartCaching(Me, MemberName)
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Sub StopCaching(ByVal MemberName As String)
|
||||
Me.DataHost.StopCaching(Me, MemberName)
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Function IsCached(ByVal MemberName As String) As Boolean
|
||||
Return Me.DataHost.IsCached(Me, MemberName)
|
||||
End Function
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Private Sub BeginInitialization()
|
||||
Me.BeginInit()
|
||||
Me.CustomTaskPanes.BeginInit()
|
||||
Me.BeginInit
|
||||
Me.CustomTaskPanes.BeginInit
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Private Sub EndInitialization()
|
||||
Me.CustomTaskPanes.EndInit()
|
||||
Me.EndInit()
|
||||
Me.CustomTaskPanes.EndInit
|
||||
Me.EndInit
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Private Sub InitializeControls()
|
||||
Me.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(Nothing, Nothing, "CustomTaskPanes", "CustomTaskPanes", Me)
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Private Sub InitializeComponents()
|
||||
End Sub
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Function NeedsFill(ByVal MemberName As String) As Boolean
|
||||
Return Me.DataHost.NeedsFill(Me, MemberName)
|
||||
End Function
|
||||
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Never)> _
|
||||
Protected Overrides Sub OnShutdown()
|
||||
Me.CustomTaskPanes.Dispose()
|
||||
MyBase.OnShutdown()
|
||||
Me.CustomTaskPanes.Dispose
|
||||
MyBase.OnShutdown
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0")> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")> _
|
||||
Partial Friend NotInheritable Class Globals
|
||||
|
||||
|
||||
'''
|
||||
Private Sub New()
|
||||
MyBase.New()
|
||||
MyBase.New
|
||||
End Sub
|
||||
|
||||
|
||||
Private Shared _ThisAddIn As ThisAddIn
|
||||
|
||||
|
||||
Private Shared _factory As Global.Microsoft.Office.Tools.Outlook.Factory
|
||||
|
||||
|
||||
Private Shared _ThisRibbonCollection As ThisRibbonCollection
|
||||
|
||||
|
||||
Private Shared _ThisFormRegionCollection As ThisFormRegionCollection
|
||||
|
||||
|
||||
Friend Shared Property ThisAddIn() As ThisAddIn
|
||||
Get
|
||||
Return _ThisAddIn
|
||||
End Get
|
||||
Set(value As ThisAddIn)
|
||||
Set
|
||||
If (_ThisAddIn Is Nothing) Then
|
||||
_ThisAddIn = value
|
||||
Else
|
||||
@@ -193,12 +193,12 @@ Partial Friend NotInheritable Class Globals
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Friend Shared Property Factory() As Global.Microsoft.Office.Tools.Outlook.Factory
|
||||
Get
|
||||
Return _factory
|
||||
End Get
|
||||
Set(value As Global.Microsoft.Office.Tools.Outlook.Factory)
|
||||
Set
|
||||
If (_factory Is Nothing) Then
|
||||
_factory = value
|
||||
Else
|
||||
@@ -206,7 +206,7 @@ Partial Friend NotInheritable Class Globals
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Friend Shared ReadOnly Property Ribbons() As ThisRibbonCollection
|
||||
Get
|
||||
If (_ThisRibbonCollection Is Nothing) Then
|
||||
@@ -215,7 +215,7 @@ Partial Friend NotInheritable Class Globals
|
||||
Return _ThisRibbonCollection
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
Friend Shared ReadOnly Property FormRegions() As ThisFormRegionCollection
|
||||
Get
|
||||
If (_ThisFormRegionCollection Is Nothing) Then
|
||||
@@ -227,23 +227,23 @@ Partial Friend NotInheritable Class Globals
|
||||
End Class
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "12.0.0.0")> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")> _
|
||||
Partial Friend NotInheritable Class ThisRibbonCollection
|
||||
Inherits Microsoft.Office.Tools.Ribbon.RibbonCollectionBase
|
||||
|
||||
|
||||
'''
|
||||
Friend Sub New(ByVal factory As Global.Microsoft.Office.Tools.Ribbon.RibbonFactory)
|
||||
MyBase.New(factory)
|
||||
End Sub
|
||||
|
||||
Default Friend Overloads ReadOnly Property Item(ByVal inspector As Microsoft.Office.Interop.Outlook.Inspector) As ThisRibbonCollection
|
||||
|
||||
Friend Overloads Default ReadOnly Property Item(ByVal inspector As Microsoft.Office.Interop.Outlook.Inspector) As ThisRibbonCollection
|
||||
Get
|
||||
Return Me.GetRibbonContextCollection(Of ThisRibbonCollection)(inspector)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Default Friend Overloads ReadOnly Property Item(ByVal explorer As Microsoft.Office.Interop.Outlook.Explorer) As ThisRibbonCollection
|
||||
|
||||
Friend Overloads Default ReadOnly Property Item(ByVal explorer As Microsoft.Office.Interop.Outlook.Explorer) As ThisRibbonCollection
|
||||
Get
|
||||
Return Me.GetRibbonContextCollection(Of ThisRibbonCollection)(explorer)
|
||||
End Get
|
||||
@@ -251,33 +251,33 @@ Partial Friend NotInheritable Class ThisRibbonCollection
|
||||
End Class
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
|
||||
Partial Friend NotInheritable Class ThisFormRegionCollection
|
||||
Inherits Microsoft.Office.Tools.Outlook.FormRegionCollectionBase
|
||||
|
||||
|
||||
'''
|
||||
Public Sub New(ByVal list As System.Collections.Generic.IList(Of Microsoft.Office.Tools.Outlook.IFormRegion))
|
||||
MyBase.New(list)
|
||||
End Sub
|
||||
|
||||
Default Friend Overloads ReadOnly Property Item(ByVal explorer As Microsoft.Office.Interop.Outlook.Explorer) As WindowFormRegionCollection
|
||||
|
||||
Friend Overloads Default ReadOnly Property Item(ByVal explorer As Microsoft.Office.Interop.Outlook.Explorer) As WindowFormRegionCollection
|
||||
Get
|
||||
Return CType(Globals.ThisAddIn.GetFormRegions(explorer, GetType(WindowFormRegionCollection)), WindowFormRegionCollection)
|
||||
Return CType(Globals.ThisAddIn.GetFormRegions(explorer, GetType(WindowFormRegionCollection)),WindowFormRegionCollection)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Default Friend Overloads ReadOnly Property Item(ByVal inspector As Microsoft.Office.Interop.Outlook.Inspector) As WindowFormRegionCollection
|
||||
|
||||
Friend Overloads Default ReadOnly Property Item(ByVal inspector As Microsoft.Office.Interop.Outlook.Inspector) As WindowFormRegionCollection
|
||||
Get
|
||||
Return CType(Globals.ThisAddIn.GetFormRegions(inspector, GetType(WindowFormRegionCollection)), WindowFormRegionCollection)
|
||||
Return CType(Globals.ThisAddIn.GetFormRegions(inspector, GetType(WindowFormRegionCollection)),WindowFormRegionCollection)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
|
||||
'''
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
|
||||
Partial Friend NotInheritable Class WindowFormRegionCollection
|
||||
Inherits Microsoft.Office.Tools.Outlook.FormRegionCollectionBase
|
||||
|
||||
|
||||
'''
|
||||
Public Sub New(ByVal list As System.Collections.Generic.IList(Of Microsoft.Office.Tools.Outlook.IFormRegion))
|
||||
MyBase.New(list)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>VERAGAddIn</RootNamespace>
|
||||
<AssemblyName>VERAGAddIn</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<DefineConstants>VSTO40</DefineConstants>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
@@ -36,8 +36,8 @@
|
||||
<PublishUrl>D:\Andreas\Programmierung\VB\OutlookAddIN\BEREITSTELLUNG\</PublishUrl>
|
||||
<InstallUrl />
|
||||
<TargetCulture>de</TargetCulture>
|
||||
<ApplicationVersion>1.0.0.27</ApplicationVersion>
|
||||
<AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.43</ApplicationVersion>
|
||||
<AutoIncrementApplicationRevision>false</AutoIncrementApplicationRevision>
|
||||
<UpdateEnabled>true</UpdateEnabled>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>days</UpdateIntervalUnits>
|
||||
@@ -54,6 +54,11 @@
|
||||
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.6.1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.6.1 %28x86 und x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
@@ -206,17 +211,17 @@
|
||||
-->
|
||||
<ItemGroup>
|
||||
<AppDesigner Include="My Project\" />
|
||||
<Compile Include="Ribbon1.Designer.vb">
|
||||
<DependentUpon>Ribbon1.vb</DependentUpon>
|
||||
<Compile Include="rbnVERAG.Designer.vb">
|
||||
<DependentUpon>rbnVERAG.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Ribbon1.vb">
|
||||
<Compile Include="rbnVERAG.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ThisAddIn.vb">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Ribbon1.resx">
|
||||
<DependentUpon>Ribbon1.vb</DependentUpon>
|
||||
<EmbeddedResource Include="rbnVERAG.resx">
|
||||
<DependentUpon>rbnVERAG.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="app.config" />
|
||||
<None Include="ThisAddIn.Designer.xml">
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
<assemblyIdentity name="WindowsBase" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup></configuration>
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
Me.Button2 = Me.Factory.CreateRibbonButton
|
||||
Me.Tab1.SuspendLayout()
|
||||
Me.VERAG.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Tab1
|
||||
'
|
||||
@@ -77,6 +78,7 @@
|
||||
Me.Tab1.PerformLayout()
|
||||
Me.VERAG.ResumeLayout(False)
|
||||
Me.VERAG.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
181
VERAGAddIn/rbnVERAG.vb
Normal file
181
VERAGAddIn/rbnVERAG.vb
Normal file
@@ -0,0 +1,181 @@
|
||||
Option Explicit On
|
||||
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
Imports Microsoft.Office.Tools.Ribbon
|
||||
Imports System.Windows.Forms
|
||||
Imports Microsoft.Office.Interop
|
||||
Imports VERAGAddIn.ThisAddIn
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
Public Class VERAGRibbon
|
||||
Dim LOGIN_OK = False
|
||||
Public Shared Event bla()
|
||||
Private Sub CustomerRibbon_Load(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonUIEventArgs) Handles MyBase.Load
|
||||
|
||||
|
||||
End Sub
|
||||
Private Function CreateRibbonDropDownItem() As RibbonDropDownItem
|
||||
Return Me.Factory.CreateRibbonDropDownItem()
|
||||
End Function
|
||||
|
||||
Private Function CreateRibbonMenu() As RibbonMenu
|
||||
Return Me.Factory.CreateRibbonMenu()
|
||||
End Function
|
||||
|
||||
Private Function CreateRibbonButton() As RibbonButton
|
||||
Dim button As RibbonButton = Me.Factory.CreateRibbonButton()
|
||||
' AddHandler (button.Click), AddressOf Button_Click
|
||||
Return button
|
||||
End Function
|
||||
|
||||
Private Sub Ribbon1_Load(ByVal sender As System.Object, ByVal e As RibbonUIEventArgs) Handles MyBase.Load
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
|
||||
initFirmaUser()
|
||||
End Sub
|
||||
|
||||
Sub initFirmaUser()
|
||||
Dim ADMIN As New cADMIN
|
||||
Try
|
||||
Dim WI = System.Security.Principal.WindowsIdentity.GetCurrent().Name
|
||||
If WI.Contains("\") Then
|
||||
Dim Split() = WI.Split("\")
|
||||
If Split(0).Contains("VERAG-NCTS") Then VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "ATILLA"
|
||||
If Split(0).Contains("VERAG") Then VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "VERAG"
|
||||
If Split(0).Contains("IMEX") Then VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "IMEX"
|
||||
|
||||
Dim UsernameTMP = ADMIN.getUstName_ByAD(Split(0), Split(1))
|
||||
|
||||
If UsernameTMP <> "" Then
|
||||
LOGIN_OK = ADMIN.checkLogin(UsernameTMP, ADMIN.getPwdFromUsrname(UsernameTMP, VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA), VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA)
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
' MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
If Not LOGIN_OK Then
|
||||
LOGIN_OK = ADMIN.checkLogin("MAIL_USER", "VERAG_MAIL_USER_2017", "VERAG")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As RibbonControlEventArgs)
|
||||
'MsgBox("HI")
|
||||
' Dim ThisAddIn As New ThisAddIn
|
||||
Dim s As String = ""
|
||||
'Dim app = ThisAddIn.getapp()
|
||||
' ThisAddIn.PrintAPageFromEmail()
|
||||
RaiseEvent bla()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As RibbonControlEventArgs) Handles Button2.Click
|
||||
If LOGIN_OK Then
|
||||
' For Each ft As Form In My.Application.OpenForms
|
||||
'If ft.GetType.ToString = "AVISO.frmEintragAviso" Then
|
||||
'ft.BringToFront()
|
||||
' Exit Sub
|
||||
' End If
|
||||
' Next
|
||||
|
||||
Dim ATTACHMENTS_LIST As New List(Of String)
|
||||
|
||||
Dim KundenNr = -1
|
||||
Dim EingangsDatum As Date = CDate("01.01.1990")
|
||||
Try
|
||||
Dim explorer As Outlook.Explorer = Globals.ThisAddIn.Application.ActiveExplorer
|
||||
Dim selection As Outlook.Selection = explorer.Selection
|
||||
If selection.Count > 0 Then
|
||||
Dim selectedItem = selection(1)
|
||||
Dim mailItem As Outlook.MailItem = selectedItem
|
||||
If mailItem IsNot Nothing Then
|
||||
EingangsDatum = mailItem.ReceivedTime
|
||||
Dim senderMail = ""
|
||||
If mailItem.SenderEmailType = "EX" Then
|
||||
senderMail = (mailItem.Sender.GetExchangeUser.PrimarySmtpAddress)
|
||||
Else
|
||||
senderMail = (mailItem.SenderEmailAddress)
|
||||
End If
|
||||
|
||||
KundenNr = VERAG_PROG_ALLGEMEIN.cKundenKontakte.getKdNrFromMailAdress(senderMail, False) ' false, wenn mehrere Niederlassungen von Frimen im KdStamm vorhanden... falsche KdNr...
|
||||
|
||||
End If
|
||||
saveAttachment(mailItem, ATTACHMENTS_LIST)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
End Try
|
||||
|
||||
|
||||
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = 0
|
||||
Dim mainForm As New AVISO.frmEintragAviso
|
||||
If KundenNr > 0 Then
|
||||
AddHandler mainForm.Shown, Sub()
|
||||
mainForm.kdAvisierer.KdNr = KundenNr
|
||||
End Sub
|
||||
End If
|
||||
If EingangsDatum > CDate("01.01.1990") Then
|
||||
mainForm.EingangsDatum = EingangsDatum
|
||||
End If
|
||||
mainForm.TopMost = True
|
||||
mainForm.StartFromOUTLOOK = True
|
||||
mainForm.ShowDialog()
|
||||
|
||||
|
||||
Try
|
||||
If VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID > 0 Then
|
||||
For Each ATT In ATTACHMENTS_LIST
|
||||
Dim fi As New IO.FileInfo(ATT)
|
||||
Dim typ = ""
|
||||
If AVISO.frmSendungAnhangImport.getFileTypeValid(typ, fi.Extension) Then
|
||||
AVISO.frmSendungAnhangImport.saveToDS(VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID, fi.Name, ATT, "", typ)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message & ex.StackTrace)
|
||||
End Try
|
||||
Else
|
||||
MsgBox("Fehler beim Login!")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub saveAttachment(mail As Outlook.MailItem, ByRef ATTACHMENTS_LIST As List(Of String))
|
||||
|
||||
Dim attachments As Outlook.Attachments = Nothing
|
||||
|
||||
Try
|
||||
attachments = mail.Attachments
|
||||
For Each attachment As Outlook.Attachment In mail.Attachments
|
||||
'Next
|
||||
'For i As Integer = 1 To attachments.Count
|
||||
' Dim attachment As Outlook.Attachment = attachments.Item(i)
|
||||
' MsgBox(attachment.FileName)
|
||||
Dim specialFolder = "OutlookAttach\Outlook_" & Now.ToString("ddMMyy_HHmmss")
|
||||
While IO.Directory.Exists(specialFolder)
|
||||
specialFolder = "OutlookAttach\Outlook_" & Now.ToString("ddMMyy_HHmmss")
|
||||
End While
|
||||
' Dim io As New IO.FileInfo(attachment.PathName)
|
||||
Dim TMP_PATH As String = VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.getTMPPath(attachment.FileName, " io.Extension", False, False, specialFolder)
|
||||
attachment.SaveAsFile(TMP_PATH)
|
||||
ATTACHMENTS_LIST.Add(TMP_PATH)
|
||||
Marshal.ReleaseComObject(attachment)
|
||||
Next
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, ex.StackTrace)
|
||||
Finally
|
||||
If attachments IsNot Nothing Then
|
||||
Marshal.ReleaseComObject(attachments)
|
||||
End If
|
||||
If mail IsNot Nothing Then
|
||||
Marshal.ReleaseComObject(mail)
|
||||
End If
|
||||
'If currInspector IsNot Nothing Then
|
||||
' Marshal.ReleaseComObject(currInspector)
|
||||
'End If
|
||||
End Try
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user