Version 20210518

This commit is contained in:
2021-05-18 08:29:29 +02:00
parent 1efa65864e
commit 278669ede2
42 changed files with 13 additions and 3 deletions

View File

@@ -187,6 +187,15 @@ Public Class frmtextmarken
Me.Save_Office()
End Sub
Private Sub document_beforeclose(ByVal Doc As Microsoft.Office.Interop.Word.Document, ByRef Cancel As Boolean) Handles objword.DocumentBeforeClose
If Doc.Name = sbdokumentname And Not Schliessen_OK Then
MsgBox("Bitte schliessen Sie das Dokument durch schliessen des Fensters 'Dokumentbefülung bearbeiten'.", vbInformation)
Cancel = True
End If
End Sub
#End Region
#Region "Load"
@@ -246,6 +255,7 @@ Public Class frmtextmarken
#End Region
#Region "Office"
Dim sbdokumentname As String = ""
Public Sub Load_Document(Optional ByVal visible As Boolean = True)
'Rel. Office 2010
Dim dokumentname As String = Globals.Applikationsdaten.Rows(0).Item("pfad_temporaer_dokumente") + Me.serienbriefnr.ToString + "_vorlage.docx"
@@ -253,6 +263,7 @@ Public Class frmtextmarken
StartWord(True)
objword.Documents.Open(dokumentname)
objdoc = objword.ActiveDocument
sbdokumentname = objdoc.Name
objword.Visible = visible
objword.WindowState = Microsoft.Office.Interop.Word.WdWindowState.wdWindowStateMaximize
End Sub