Nach Update Syncfusion / Anpassungen Nativ
This commit is contained in:
@@ -50,6 +50,16 @@ namespace DOCGEN.Klassen
|
||||
document.CustomDocumentProperties.Add(property, value);
|
||||
|
||||
}
|
||||
|
||||
TextSelection[] textSelections = document.FindAll("{Klassifizierung}", false, true);
|
||||
foreach (TextSelection textSelection in textSelections)
|
||||
{
|
||||
//Gets the found text as single text range and sets highlight color
|
||||
WTextRange textRange = textSelection.GetAsOneRange();
|
||||
textRange.Text = value;
|
||||
}
|
||||
|
||||
document.UpdateDocumentFields();
|
||||
document.Save(destfile);
|
||||
ms.Close();
|
||||
document.Dispose();
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using Syncfusion.DocIO.DLS;
|
||||
using Syncfusion.Presentation;
|
||||
using Syncfusion.XlsIO;
|
||||
|
||||
@@ -27,6 +30,30 @@ namespace DOCGEN.Klassen
|
||||
pptxDoc.CustomDocumentProperties[property].Value = value;
|
||||
|
||||
}
|
||||
try
|
||||
{
|
||||
ITextSelection[] textSelections = pptxDoc.FindAll(property, false, false);
|
||||
foreach (ITextSelection textSelection in textSelections)
|
||||
{
|
||||
|
||||
ITextPart textPart = textSelection.GetAsOneTextPart();
|
||||
|
||||
textPart.Text = value;
|
||||
}
|
||||
|
||||
// ITextSelection[] textSelection = pptxDoc.FindAll(property, false, false);
|
||||
// foreach (ITextSelection textSelection in textSelections)
|
||||
// {
|
||||
// //Get the found text as a single text part.
|
||||
// ITextPart textPart = textSelection.GetAsOneTextPart();
|
||||
// //Replace the text.
|
||||
// textPart.Text = value;
|
||||
// }
|
||||
//// ITextPart textPart = textSelection.GetAsOneTextPart();
|
||||
// // textPart.Text = value;
|
||||
}
|
||||
catch { }
|
||||
|
||||
ms.Close();
|
||||
ms.Dispose();
|
||||
pptxDoc.Save(destfile);
|
||||
|
||||
@@ -28,6 +28,8 @@ namespace DOCGEN.Klassen
|
||||
workbook.CustomDocumentProperties[property].Text = value;
|
||||
|
||||
}
|
||||
workbook.Replace("{Klassifizierung}", value);
|
||||
//workbook.Names[workbook.CustomDocumentProperties[property].Name].RefersToRange.Text= workbook.CustomDocumentProperties[property].Text;
|
||||
workbook.SaveAs(os);
|
||||
workbook.Close();
|
||||
workbook = null;
|
||||
|
||||
Reference in New Issue
Block a user