2/21/2023 0 Comments How to freeze text in wordTo make this work, we’re going to need to use the tools provided in the. RELATED: How to Protect Parts of a Word Document from Editing. Var texts = textToAdd.Split(new, StringSplitOptions. Let’s say you’re working on a document that other people on the same network have access to and you want to lock your text boxes, so they don’t get edited by mistake. Public static void AddFormattedText(this Run run, string textToAdd) I've knocked together a simple extension method that will split a string on a new line and append Text elements to a Run with Breaks where the new lines were: public static class OpenXmlExtension You need to use a Break in order to add new lines, otherwise they will just be ignored.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |