Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 01-30-2013, 04:23 AM
konopca konopca is offline Save table sytle, NOT a specific table Windows XP Save table sytle, NOT a specific table Office 2003
Novice
 
Join Date: Apr 2011
Posts: 27
konopca is on a distinguished road
Default

Hi Lebber - I don't use table styles so I can't help you with that. But I do have some code that I use to highlight every other table row. I hope it works for you; if it doesn't I probably can't help you there either as only dabble in macros. Here it is: First, remove all shading and then put your cursor in the first row that you want to apply shading.

Code:
 
Sub ShadeEveryOtherTblRow()
'
' Macro1 Macro
'
'This counter performs the shading on the stated number of rows
Do While intCounter < 7
intCounter = intCounter + 1
'The following highlights the row the cursor is on (the first row that you want shaded)
Selection.EndKey Unit:=wdRow, Extend:=True
'The following formats the row as a shade of grey
With Selection.Cells
With .Shading
.BackgroundPatternColor = -603930625
End With
End With
'The following moves the cursor down two rows
Selection.EndKey Unit:=wdRow
Selection.MoveRight Unit:=wdCell
Selection.EndKey Unit:=wdRow
Selection.MoveRight Unit:=wdCell
Loop
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Save table sytle, NOT a specific table Mail Merge to create specific number of table rows flackend Mail Merge 4 12-01-2023 02:49 PM
Save table sytle, NOT a specific table Layered or Nested Table difficulty--can't edit the table underneath theheartsmaster Word Tables 1 12-10-2012 04:10 AM
Save table sytle, NOT a specific table Update Word table based on another table input mpdsal Word VBA 10 10-29-2012 07:40 AM
Insert table in document - automatically updates second table in summary? Mechanic Word 2 08-01-2012 09:44 PM
Easy send/save Excel data to Database Table or Stored Procedure TonyHarvard Excel 3 07-11-2012 12:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:55 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft