Update 20250206

This commit is contained in:
Stefan Hutter
2025-02-06 22:23:45 +01:00
parent 678e0622fd
commit c316b40507
87 changed files with 995 additions and 576 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1560,7 +1560,9 @@ namespace OnDocOffice
Start_Application();
//word.Visible = true;
word.Documents.Open(filename);
word.Visible = true;
string path_unterschriftlinks = "";
string path_unterschriftrechts = "";
if ( unterschriftlinks != "-1")
@@ -1601,11 +1603,20 @@ namespace OnDocOffice
public class word_signature
{
bool is_protected = false;
Microsoft.Office.Interop.Word.Document docWord;
public bool sign_doc(ref Microsoft.Office.Interop.Word.Application word, string imagepath_ul, string imagepath_ur, string dokumentid)
{
Logging.Logging.Debug("Sign_Doc", "OnDoc", dokumentid);
docWord = word.ActiveDocument;
Thread.Sleep(1000);
if (word.ActiveDocument.ProtectionType != Microsoft.Office.Interop.Word.WdProtectionType.wdNoProtection)
{
word.ActiveDocument.Unprotect(Password: "Australia");
is_protected = true;
}
try
{
foreach (Microsoft.Office.Interop.Word.Bookmark bm in docWord.Bookmarks)
@@ -1621,6 +1632,16 @@ namespace OnDocOffice
}
//docword = docWord; ;
if (is_protected)
{
try
{
word.ActiveDocument.Protect(Type: Microsoft.Office.Interop.Word.WdProtectionType.wdAllowOnlyFormFields, NoReset: true, Password: "Australia");
}
catch { }
}
Thread.Sleep(1000);
Logging.Logging.Debug("Ende Sign_Doc", "OnDoc", dokumentid);
return true;
}