Nevermind it was just an error I did, working perfectly now!
Beiträge von Lommen
-
-
Thanks for the reply! I'm well on my way to get this working now but I have one last problem.
This is my current code when I enter the form:
CodeWPDLLInt.SetDLLName(Application.StartupPath + @"\WPTextDLL01.DLL");InitializeComponent();wpdllInt1.Memo.LoadFromFile(@"c:\test.rtf", false, "RTF");wpdllInt1.Memo.TextCursor.FieldsFromTokens("[", "]", "PERSON.");wpdllInt1.Memo.MergeText("");
And in my RTF-Document I have some fields like [NAME], [ADDRESS] etc.
And this is my method for changing the values:
Codeprivate void wpdllInt1_OnFieldGetText(object Sender, int Editor, string FieldName, IWPFieldContents Contents) { if (FieldName.Equals("PERSON.NAME")) Contents.StringValue = "Julian Ziersch"; if (FieldName.Equals("PERSON.ADDRESS")) Contents.StringValue = "Testaddress 123"; }
The problem is by doing like this it only does the first field, in this example PERSON.NAME-field and doesnt iterate to the other one. How do I get it to go through all of them?
-
Hi!
I dont know if im blind or something but i've been staring throgh the manual for TextDynamic .NET but I cant find the solution for the simplest problem.
Basically I want to have a document (rtf, word or whatever txtdynamic supports), Load the document, change some fields example: <<NAME>> to "Fredrik" and then save it to a new document.
Im developing in visual studio with C#. Is there any code example to accomplish this simple task?