diff --git a/VERAGAddIn.sln b/VERAGAddIn.sln new file mode 100644 index 0000000..58d67db --- /dev/null +++ b/VERAGAddIn.sln @@ -0,0 +1,68 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VERAGAddIn", "VERAGAddIn\VERAGAddIn.vbproj", "{D579F7A6-7D29-4295-B382-DA5F7EFB4528}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VERAG_PROG_ALLGEMEIN", "..\..\SDL\SDL\VERAG_PROG_ALLGEMEIN\VERAG_PROG_ALLGEMEIN.vbproj", "{A3B497BD-842C-4A2B-B398-ED1976849DF1}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Gemeinsames", "..\..\AVISO\Aviso\Gemeinsames\Gemeinsames.vbproj", "{110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}" +EndProject +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Aviso", "..\..\AVISO\Aviso\Aviso\Aviso.vbproj", "{7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Debug|x86.ActiveCfg = Debug|Any CPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Release|Any CPU.Build.0 = Release|Any CPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528}.Release|x86.ActiveCfg = Release|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Debug|x86.ActiveCfg = Debug|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Release|Any CPU.Build.0 = Release|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {A3B497BD-842C-4A2B-B398-ED1976849DF1}.Release|x86.ActiveCfg = Release|Any CPU + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Debug|Any CPU.ActiveCfg = Debug|x86 + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Debug|x86.ActiveCfg = Debug|x86 + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Debug|x86.Build.0 = Debug|x86 + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Release|Any CPU.ActiveCfg = Release|x86 + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Release|Mixed Platforms.Build.0 = Release|x86 + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Release|x86.ActiveCfg = Release|x86 + {110C923B-CB02-4FD0-AF24-95E0F0EEEFF5}.Release|x86.Build.0 = Release|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Debug|Any CPU.ActiveCfg = Debug|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Debug|x86.ActiveCfg = Debug|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Debug|x86.Build.0 = Debug|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Release|Any CPU.ActiveCfg = Release|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Release|Mixed Platforms.Build.0 = Release|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Release|x86.ActiveCfg = Release|x86 + {7BDD8C2F-2C9E-49F1-A365-3B1DA1C84991}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/VERAGAddIn/My Project/AssemblyInfo.vb b/VERAGAddIn/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..7db10bd --- /dev/null +++ b/VERAGAddIn/My Project/AssemblyInfo.vb @@ -0,0 +1,45 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices +Imports System.Security + +' Allgemeine Informationen über eine Assembly werden über die folgende +' Attributgruppe gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +' die mit einer Assembly verknüpft sind. + +' Die Werte der Assemblyattribute überprüfen + + + + + + + + +' Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar +' für COM-Komponenten. Wenn Sie auf einen Zugriffstyp in dieser Assembly aus +' COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. + + +'Die folgende GUID ist für die ID der typelib, wenn dieses Projekt für COM verfügbar gemacht wird + + +' Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +' +' Hauptversion +' Nebenversion +' Buildnummer +' Revision +' +' Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern +' übernehmen, indem Sie "*" eingeben: +' + + + + +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" + Public Const RibbonBaseTypeSerializer As String = "System.ComponentModel.Design.Serialization.TypeCodeDomSerializer, System.Design" + Public Const RibbonDesigner As String = "Microsoft.VisualStudio.Tools.Office.Ribbon.Design.RibbonDesigner, Microsoft.VisualStudio.Tools.Office.Designer, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" +End Module diff --git a/VERAGAddIn/My Project/Resources.Designer.vb b/VERAGAddIn/My Project/Resources.Designer.vb new file mode 100644 index 0000000..9c1fd98 --- /dev/null +++ b/VERAGAddIn/My Project/Resources.Designer.vb @@ -0,0 +1,83 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + +Imports System + +Namespace My.Resources + + 'Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert + '-Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. + 'Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + 'mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. + ''' + ''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("VERAGAddIn.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + ''' Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set + resourceCulture = value + End Set + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Aviso() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Aviso", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. + ''' + Friend ReadOnly Property Aviso1() As System.Drawing.Bitmap + Get + Dim obj As Object = ResourceManager.GetObject("Aviso1", resourceCulture) + Return CType(obj,System.Drawing.Bitmap) + End Get + End Property + End Module +End Namespace diff --git a/VERAGAddIn/My Project/Resources.resx b/VERAGAddIn/My Project/Resources.resx new file mode 100644 index 0000000..b8ac63e --- /dev/null +++ b/VERAGAddIn/My Project/Resources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\Aviso.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Aviso1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/VERAGAddIn/My Project/Settings.Designer.vb b/VERAGAddIn/My Project/Settings.Designer.vb new file mode 100644 index 0000000..6a9c0e5 --- /dev/null +++ b/VERAGAddIn/My Project/Settings.Designer.vb @@ -0,0 +1,71 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + + + _ +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" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property +End Class + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.VERAGAddIn.MySettings + Get + Return Global.VERAGAddIn.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/VERAGAddIn/My Project/Settings.settings b/VERAGAddIn/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/VERAGAddIn/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/VERAGAddIn/Resources/Aviso.png b/VERAGAddIn/Resources/Aviso.png new file mode 100644 index 0000000..30638a1 Binary files /dev/null and b/VERAGAddIn/Resources/Aviso.png differ diff --git a/VERAGAddIn/Resources/Aviso1.png b/VERAGAddIn/Resources/Aviso1.png new file mode 100644 index 0000000..30638a1 Binary files /dev/null and b/VERAGAddIn/Resources/Aviso1.png differ diff --git a/VERAGAddIn/Ribbon1.Designer.vb b/VERAGAddIn/Ribbon1.Designer.vb new file mode 100644 index 0000000..7ea9663 --- /dev/null +++ b/VERAGAddIn/Ribbon1.Designer.vb @@ -0,0 +1,96 @@ +Partial Class VERAGRibbon + Inherits Microsoft.Office.Tools.Ribbon.RibbonBase + + _ + Public Sub New(ByVal container As System.ComponentModel.IContainer) + MyClass.New() + + 'Erforderlich für die Unterstützung des Windows.Forms-Klassenkompositions-Designers + If (container IsNot Nothing) Then + container.Add(Me) + End If + + End Sub + + _ + Public Sub New() + MyBase.New(Globals.Factory.GetRibbonFactory()) + + 'Dieser Aufruf ist für den Komponenten-Designer erforderlich. + InitializeComponent() + + End Sub + + 'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Wird vom Komponenten-Designer benötigt. + Private components As System.ComponentModel.IContainer + + 'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich. + 'Das Bearbeiten ist mit dem Komponenten-Designer möglich. + 'Nehmen Sie keine Änderungen mit dem Code-Editor vor. + _ + Private Sub InitializeComponent() + Me.Tab1 = Me.Factory.CreateRibbonTab + Me.VERAG = Me.Factory.CreateRibbonGroup + Me.Button2 = Me.Factory.CreateRibbonButton + Me.Tab1.SuspendLayout() + Me.VERAG.SuspendLayout() + ' + 'Tab1 + ' + Me.Tab1.ControlId.ControlIdType = Microsoft.Office.Tools.Ribbon.RibbonControlIdType.Office + Me.Tab1.Groups.Add(Me.VERAG) + Me.Tab1.Label = "VERAG" + Me.Tab1.Name = "Tab1" + ' + 'VERAG + ' + Me.VERAG.Items.Add(Me.Button2) + Me.VERAG.Label = "AVISO" + Me.VERAG.Name = "VERAG" + ' + 'Button2 + ' + Me.Button2.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge + Me.Button2.Image = Global.VERAGAddIn.My.Resources.Resources.Aviso1 + Me.Button2.Label = "Neues Aviso" + Me.Button2.Name = "Button2" + Me.Button2.ShowImage = True + ' + 'VERAGRibbon + ' + Me.Name = "VERAGRibbon" + Me.RibbonType = "Microsoft.Outlook.Explorer" + Me.Tabs.Add(Me.Tab1) + Me.Tab1.ResumeLayout(False) + Me.Tab1.PerformLayout() + Me.VERAG.ResumeLayout(False) + Me.VERAG.PerformLayout() + + End Sub + + Friend WithEvents Tab1 As Microsoft.Office.Tools.Ribbon.RibbonTab + Friend WithEvents VERAG As Microsoft.Office.Tools.Ribbon.RibbonGroup + Friend WithEvents Button2 As Microsoft.Office.Tools.Ribbon.RibbonButton +End Class + +Partial Class ThisRibbonCollection + + _ + Friend ReadOnly Property Ribbon1() As VERAGRibbon + Get + Return Me.GetRibbon(Of VERAGRibbon)() + End Get + End Property +End Class diff --git a/VERAGAddIn/Ribbon1.resx b/VERAGAddIn/Ribbon1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/VERAGAddIn/Ribbon1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/VERAGAddIn/Ribbon1.vb b/VERAGAddIn/Ribbon1.vb new file mode 100644 index 0000000..9cc8dd9 --- /dev/null +++ b/VERAGAddIn/Ribbon1.vb @@ -0,0 +1,91 @@ +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 diff --git a/VERAGAddIn/ThisAddIn.Designer.vb b/VERAGAddIn/ThisAddIn.Designer.vb new file mode 100644 index 0000000..3c29eba --- /dev/null +++ b/VERAGAddIn/ThisAddIn.Designer.vb @@ -0,0 +1,285 @@ +'------------------------------------------------------------------------------ +' +' Dieser Code wurde von einem Tool generiert. +' Laufzeitversion:4.0.30319.42000 +' +' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn +' der Code erneut generiert wird. +' +'------------------------------------------------------------------------------ + +Option Strict Off +Option Explicit On + + + +''' + _ +Partial Public NotInheritable Class ThisAddIn + Inherits Microsoft.Office.Tools.Outlook.OutlookAddInBase + + Friend WithEvents CustomTaskPanes As Microsoft.Office.Tools.CustomTaskPaneCollection + + _ + Friend WithEvents Application As Microsoft.Office.Interop.Outlook.Application + + ''' + _ + 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 + + ''' + _ + Protected Overrides Sub 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() + End Sub + + ''' + _ + Protected Overrides Sub FinishInitialization() + Me.OnStartup() + End Sub + + ''' + _ + Protected Overrides Sub InitializeDataBindings() + Me.BeginInitialization() + Me.BindToData() + Me.EndInitialization() + End Sub + + ''' + _ + Private Sub InitializeCachedData() + If (Me.DataHost Is Nothing) Then + Return + End If + If Me.DataHost.IsCacheInitialized Then + Me.DataHost.FillCachedData(Me) + End If + End Sub + + ''' + _ + Private Sub InitializeData() + End Sub + + ''' + _ + Private Sub BindToData() + End Sub + + ''' + _ + Private Sub StartCaching(ByVal MemberName As String) + Me.DataHost.StartCaching(Me, MemberName) + End Sub + + ''' + _ + Private Sub StopCaching(ByVal MemberName As String) + Me.DataHost.StopCaching(Me, MemberName) + End Sub + + ''' + _ + Private Function IsCached(ByVal MemberName As String) As Boolean + Return Me.DataHost.IsCached(Me, MemberName) + End Function + + ''' + _ + Private Sub BeginInitialization() + Me.BeginInit() + Me.CustomTaskPanes.BeginInit() + End Sub + + ''' + _ + Private Sub EndInitialization() + Me.CustomTaskPanes.EndInit() + Me.EndInit() + End Sub + + ''' + _ + Private Sub InitializeControls() + Me.CustomTaskPanes = Globals.Factory.CreateCustomTaskPaneCollection(Nothing, Nothing, "CustomTaskPanes", "CustomTaskPanes", Me) + End Sub + + ''' + _ + Private Sub InitializeComponents() + End Sub + + ''' + _ + Private Function NeedsFill(ByVal MemberName As String) As Boolean + Return Me.DataHost.NeedsFill(Me, MemberName) + End Function + + ''' + _ + Protected Overrides Sub OnShutdown() + Me.CustomTaskPanes.Dispose() + MyBase.OnShutdown() + End Sub +End Class + +''' + _ +Partial Friend NotInheritable Class Globals + + ''' + Private Sub 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) + If (_ThisAddIn Is Nothing) Then + _ThisAddIn = value + Else + Throw New System.NotSupportedException() + 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) + If (_factory Is Nothing) Then + _factory = value + Else + Throw New System.NotSupportedException() + End If + End Set + End Property + + Friend Shared ReadOnly Property Ribbons() As ThisRibbonCollection + Get + If (_ThisRibbonCollection Is Nothing) Then + _ThisRibbonCollection = New ThisRibbonCollection(_factory.GetRibbonFactory) + End If + Return _ThisRibbonCollection + End Get + End Property + + Friend Shared ReadOnly Property FormRegions() As ThisFormRegionCollection + Get + If (_ThisFormRegionCollection Is Nothing) Then + _ThisFormRegionCollection = New ThisFormRegionCollection(Globals.ThisAddIn.GetFormRegions) + End If + Return _ThisFormRegionCollection + End Get + End Property +End Class + +''' + _ +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 + 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 + Get + Return Me.GetRibbonContextCollection(Of ThisRibbonCollection)(explorer) + End Get + End Property +End Class + +''' + _ +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 + Get + 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 + Get + Return CType(Globals.ThisAddIn.GetFormRegions(inspector, GetType(WindowFormRegionCollection)), WindowFormRegionCollection) + End Get + End Property +End Class + +''' + _ +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) + End Sub +End Class diff --git a/VERAGAddIn/ThisAddIn.Designer.xml b/VERAGAddIn/ThisAddIn.Designer.xml new file mode 100644 index 0000000..8f25102 --- /dev/null +++ b/VERAGAddIn/ThisAddIn.Designer.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/VERAGAddIn/ThisAddIn.vb b/VERAGAddIn/ThisAddIn.vb new file mode 100644 index 0000000..9f552d0 --- /dev/null +++ b/VERAGAddIn/ThisAddIn.vb @@ -0,0 +1,56 @@ +Option Explicit On + +Imports Microsoft.Office.Interop +Imports System.Windows.Forms +Imports Microsoft.Office.Core +Imports Microsoft.Office.Tools.Ribbon + +'Option Private Module +'Imports Microsoft.Office.Core + +Public Class ThisAddIn + Private WithEvents inspectors As Outlook.Inspectors + + Private Sub ThisAddIn_Startup(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Startup + inspectors = Me.Application.Inspectors + + AddHandler VERAGRibbon.bla, Sub() + ' MsgBox("JOAS") + TestPrintFirstPage() + End Sub + End Sub + Private APP = Me.Application + + + + Public Sub TestPrintFirstPage() + Dim Mail As Outlook.MailItem + Mail = Application.ActiveExplorer.Selection(1) + PrintFirstPage2(Mail) + End Sub + + Public Sub PrintFirstPage2(Mail As Outlook.MailItem) + ' Dim wdApp As Word.Application + ' Dim wdDoc As Word.Document + ' Dim olDoc As Word.Document + + ' wdApp = CreateObject("Word.Application") + ' wdDoc = wdApp.Documents.Add(Visible:=True) + + '' olDoc = Mail.GetInspector.WordEditor + ' olDoc.Range.Copy() + ' wdDoc.Range.Paste() + + ' wdDoc.PrintOut(Range:="wdPrintFromTo", From:="1", To:="1") + + 'DoEvents() + ' wdDoc.Close(False) + ' wdApp.Quit() + End Sub + + + + +End Class + + diff --git a/VERAGAddIn/VERAGAddIn.vbproj b/VERAGAddIn/VERAGAddIn.vbproj new file mode 100644 index 0000000..a0b9f54 --- /dev/null +++ b/VERAGAddIn/VERAGAddIn.vbproj @@ -0,0 +1,354 @@ + + + + + + {BAA0C2D2-18E2-41B9-852F-F413020CAA33};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} + Debug + AnyCPU + {D579F7A6-7D29-4295-B382-DA5F7EFB4528} + Library + VERAGAddIn + VERAGAddIn + v4.5 + VSTO40 + + + + False + true + D:\Andreas\Programmierung\VB\OutlookAddIN\BEREITSTELLUNG\ + + de + 1.0.0.27 + true + true + 7 + days + VERAGAddIn + + + VERAGAddIn + + 3 + + + + False + Microsoft .NET Framework 4.5 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Microsoft Visual Studio 2010-Tools für Office-Laufzeit %28x86 und x64%29 + true + + + False + Windows Installer 4.5 + true + + + + + Outlook + + + On + + + + $(DefineConstants) + true + true + full + true + false + bin\Debug\ + VERAGAddIn.xml + false + false + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + + + + false + true + pdbonly + true + bin\Release\ + VERAGAddIn.xml + false + false + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + + + + + + + + + + + + + + + + + + + + + + True + + + + + False + true + + + False + true + + + False + + + + + + + + + + + + + + + + + + Ribbon1.vb + + + Component + + + Code + + + Ribbon1.vb + + + + ThisAddIn.vb + + + ThisAddIn.Designer.xml + + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + True + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.vb + + + True + Settings.settings + True + + + + + + + {AC2DE821-36A2-11CF-8053-00AA006009FA} + 2 + 0 + 0 + tlbimp + False + True + + + {00020430-0000-0000-C000-000000000046} + 2 + 0 + 0 + primary + False + True + + + {00020430-0000-0000-C000-000000000046} + 2 + 0 + 0 + primary + False + True + + + {0002E157-0000-0000-C000-000000000046} + 5 + 3 + 0 + primary + False + True + + + + + {7bdd8c2f-2c9e-49f1-a365-3b1da1c84991} + Aviso + + + {110c923b-cb02-4fd0-af24-95e0f0eeeff5} + Gemeinsames + + + {a3b497bd-842c-4a2b-b398-ed1976849df1} + VERAG_PROG_ALLGEMEIN + + + + + + + + + + 10.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + On + + + Binary + + + Off + + + true + + + + + + + D08413FBDF065D4AB51DA9E7705AC1B0DA0041F2 + + + false + + + false + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/VERAGAddIn/app.config b/VERAGAddIn/app.config new file mode 100644 index 0000000..a029089 --- /dev/null +++ b/VERAGAddIn/app.config @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file