#1
|
|||
|
|||
1. Apply to current row. 2. De-select row afterwards.
Hello! New to the forum. Thank you!
I have been trying to finish the macro as seen below. However, the last 2 things I just can't seem to figure out. Code:
Sub TblCellShadeOf_TEN_Percent() ' ' ------------------------------------ Dim tbl As table Set tbl = ActiveDocument.Tables(1) tbl.Rows(6).Select ' ------------------------------------ With Selection.Cells With .Shading .Texture = wdTextureNone .ForegroundPatternColor = wdColorAutomatic .BackgroundPatternColor = wdColorGray10 End With End With End Sub 2. How to de-select the row after the shading is applied. Once the shading is done, the row _is_ shaded, but I'd rather the current row have the 10% shading applied without showing it still selected in the end. I'm sure it's represented by something in the code above, but I'm not very good at vba, so can't figure out what code does that (I know, I know ... dumb ... Thank you very much in advance for any help in this regard! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need to apply Heading1 to select rows | bobk544 | Word VBA | 3 | 06-09-2018 05:24 AM |
VBA Word Table - Select More than 1 Column at a time - Apply Formatting | jc491 | Word VBA | 12 | 09-24-2015 06:03 AM |
How to select the first row of the current table | Jennifer Murphy | Word VBA | 9 | 01-29-2012 06:50 PM |
How to call current PC date and/or current PC year | KIM SOLIS | Excel | 2 | 11-04-2011 06:09 PM |
Auto insert current month's name and current year | Styler001 | Word | 4 | 01-25-2010 06:40 PM |