update 20250212
This commit is contained in:
@@ -41,12 +41,13 @@ namespace ZZ_Signature_C
|
||||
word = new Microsoft.Office.Interop.Word.Application();
|
||||
docWord = word.Documents.Open(@"E:\Software-Projekte\OnDoc\Excel_Dateien\Signature.docx");
|
||||
docWord.Activate();
|
||||
|
||||
insert_unterschrift("Unterschrift2");
|
||||
insert_unterschrift("TGEDKNameVornameLinksB");
|
||||
|
||||
word.Visible = true;
|
||||
|
||||
insert_unterschrift("TGEDKVornameNameLinksB99");
|
||||
insert_unterschrift("TGEDKVornameNameRechtsB99");
|
||||
|
||||
|
||||
|
||||
word.ActiveDocument.SaveAs2(@"E:\Software-Projekte\OnDoc\Excel_Dateien\SignatureSigned.docx");
|
||||
|
||||
docWord = null;
|
||||
@@ -88,23 +89,12 @@ namespace ZZ_Signature_C
|
||||
|
||||
float vertical = bm.Range.Information[Microsoft.Office.Interop.Word.WdInformation.wdVerticalPositionRelativeToPage];
|
||||
float horizontal = bm.Range.Information[Microsoft.Office.Interop.Word.WdInformation.wdHorizontalPositionRelativeToPage];
|
||||
//vertical = vertical - 50;
|
||||
|
||||
//word.ActiveDocument.Bookmarks[tmn].Select();
|
||||
|
||||
//Microsoft.Office.Interop.Word.Shape myshape1 = docWord.Shapes.AddShape(1, horizontal, vertical, 120, 50);
|
||||
//myshape1.Fill.UserPicture(@"E:\Software-Projekte\OnDoc\Unterschriften\1.jpg");
|
||||
////myshape1.Line.Weight = -2;
|
||||
//myshape1.Name = "Unterschrift" + "_" + tmn;
|
||||
//myshape1.Line.Visible= Microsoft.Office.Core.MsoTriState.msoFalse;
|
||||
|
||||
////Microsoft.Office.Interop.Word.InlineShape myshape3 = word.Selection.InlineShapes.AddPicture(@"E:\Software-Projekte\OnDoc\Unterschriften\1.jpg",false,true,myRange,);
|
||||
|
||||
|
||||
|
||||
docWord.Activate();
|
||||
Microsoft.Office.Interop.Word.Range myRange3 = bm.Range;
|
||||
Microsoft.Office.Interop.Word.Range myRange4 = bm.Range.GoTo();
|
||||
|
||||
|
||||
Microsoft.Office.Interop.Word.Shape myShape = docWord.Shapes.AddPicture(@"E:\Software-Projekte\OnDoc\Unterschriften\1.jpg", false, true, 0, 0, 120, 50, myRange);
|
||||
myShape.WrapFormat.Type = Microsoft.Office.Interop.Word.WdWrapType.wdWrapTight;
|
||||
myShape.RelativeHorizontalPosition = Microsoft.Office.Interop.Word.WdRelativeHorizontalPosition.wdRelativeHorizontalPositionPage;
|
||||
@@ -117,6 +107,18 @@ namespace ZZ_Signature_C
|
||||
myShape.Select();
|
||||
return;
|
||||
|
||||
//vertical = vertical - 50;
|
||||
|
||||
//word.ActiveDocument.Bookmarks[tmn].Select();
|
||||
|
||||
//Microsoft.Office.Interop.Word.Shape myshape1 = docWord.Shapes.AddShape(1, horizontal, vertical, 120, 50);
|
||||
//myshape1.Fill.UserPicture(@"E:\Software-Projekte\OnDoc\Unterschriften\1.jpg");
|
||||
////myshape1.Line.Weight = -2;
|
||||
//myshape1.Name = "Unterschrift" + "_" + tmn;
|
||||
//myshape1.Line.Visible= Microsoft.Office.Core.MsoTriState.msoFalse;
|
||||
|
||||
////Microsoft.Office.Interop.Word.InlineShape myshape3 = word.Selection.InlineShapes.AddPicture(@"E:\Software-Projekte\OnDoc\Unterschriften\1.jpg",false,true,myRange,);
|
||||
|
||||
Microsoft.Office.Interop.Word.Shape myshape = docWord.Shapes.AddTextbox(Microsoft.Office.Core
|
||||
.MsoTextOrientation.msoTextOrientationHorizontal, (float)horizontal,
|
||||
(float)vertical, 120, 56, ref missing);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user