![]() ![]() Note: The code deletes leading/trailing tabs as well. You can simply select the applicable range, change the paragraph alignment to 'centre', then change it back again to whatever is was previously.Īlternatively, to programmatically delete all leading and trailing white spaces, try the following Word MSDN Support, feel free to contact you don't actually need a macro or even Find/Replace for that. If you have any compliments or complaints to This can be beneficial to other community members reading this thread. Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. Your range.Text or the screenshot you describe here, so that I can analyze your issue better. TextBox1.Text = reg.Replace(rangeText, "bbbbb")Īccording to your description, you said if my content contains "HYPERLINKS", it removes that also, but from your RegExp, it just use "bbbbb" string to replace the space at the beginning of the character, can you please share Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click ![]() I have tested your code at my side, you use RegExp ("^\s "), do you want to use "bbbbb" string to replace the space at the beginning of the character? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |