I'm reaching out to you for help with another bit of code that I just can't figure out.
I have a Chinese document in Word where the last line of EVERY paragraph must have more than one character besides punctuation. I have written a macro to search for all paragraph marks of a number of styles, move left three characters, and insert a zero-width, non-breaking character. This works great on all content except for paragraphs inside tables since there aren't paragraph marks (unless there are more than one paragraph) and you can't search for the "end of table cell" mark.
We use tables (typically 2-column) in our documents to help format text & associated graphics (instead of using inline graphics). We have a graphic in the left column and text in the right column, or the other way around. We use one of 7 different styles for the text in the table cells (i.e., Body Text, Table Text, etc.).
I need to search just tables for certain styles and do the same thing I've done with the aforementioned macro.
Here's the macro solution that works for all the content not in tables. If this can be modified to include the table content, I'd love the help. If not, how do I search just tables to do this?
Dim rng As Range
Dim i As Long
Selection.GoTo What:=wdGoToSection, Which:=wdGoToNext, Name:="5"
For i = 1 To 19
Set rng = ActiveDocument.Range
.Text = "^p"
.Style = Choose(i, "Body Text", "Body Text - After Table", "List Bullet Checkmark", "Body Text 2 - PreNumbered", _
"Body Text Indent", "List Bullet Box", "Table Text L - Parts", "Step", "Step Text", "Table Text L - 9 pt", _
"Legend List", "List", "List Continue", "Legend List Bullet Indent", "List Bullet Box Indent", _
"Step Result", "Caution Bullet", "Body Text - PreNumbered", "Legend List Continue")
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
Selection.MoveLeft Unit:=wdCharacter, Count:=3
Selection.InsertSymbol CharacterNumber:=8205, Unicode:=True, Bias:=0
If anyone out there has a solution or suggestions, I'll give you the max points possible!! HELP!
Thanks so much in advance.