Var firstTwent圜hars = restOfText.Substring(0, 20) įirstTwent圜hars += SequentialReplaceToken įindAndReplace(word, SequentialReplaceToken, firstTwent圜hars) įindAndReplace(word, SequentialReplaceToken, restOfText) įindAndReplace(.) being a wrapper over the Word interop Function. FindAndReplace(word, replacementKey, SequentialReplaceToken) ![]() You could do something like this of you really must do it this way. I recognize that this is a year old but since the technical side of the question never got answered I figured I take the time to post this for who ever stumbles upon it. Ref wrap, ref format, ref replaceWithText,īut in here if the "replaceWithText" too lone there is error and it says String parameter too long. private void FindAndReplace(.Application WordApp, object findText, object replaceWithText) So this is my code for replace word document variables. I want to create a world document using C#.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |