This commit is contained in:
2019-08-09 09:42:50 +02:00
parent 8ec46614b7
commit 5dc6ec54bd
16 changed files with 1422 additions and 0 deletions

56
VERAGAddIn/ThisAddIn.vb Normal file
View File

@@ -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