![]() |
|
#1
|
|||
|
|||
![]()
Hi All!
I have a huge problem, that is tables with different formatting on my presentation. I want to choose one of them to be a reference to the others and update all tables from the presentation automactly. That means having all tables with the same width, columns with the same width, same background, text colors, etc. I found a macro for that but I dont think it works on 2007. Regards |
#2
|
|||
|
|||
![]()
Table Format Copy
Select a table that you have formatted exactly how you like it, run this and all other tables in the presentation will copy the format. Note the format of the first cell is used to set the overall format. If cells in a table have different formats they will all be set to the format of the first cell. Sub tabufix() Dim otbl As Table, osld As Slide, IRow As Integer, ICol As Integer On Error GoTo errhandler If ActiveWindow.Selection.ShapeRange.Count <> 1 Then GoTo errhandler If ActiveWindow.Selection.ShapeRange.Type <> msoTable Then MsgBox "You haven't selected a table" Exit Sub End If Set otbl = ActiveWindow.Selection.ShapeRange.Table With otbl .Cell(1, 1).Shape.PickUp End With For Each osld In ActivePresentation.Slides For Each oshp In osld.Shapes If oshp.Type = msoTable Then For IRow = 1 To oshp.Table.Rows.Count For ICol = 1 To oshp.Table.Columns.Count oshp.Table.Cell(IRow, ICol).Shape.Apply Next ICol Next IRow End If Next oshp Next osld Exit Sub errhandler: MsgBox "Error, Did you select just one thing?" End Sub |
#3
|
|||
|
|||
![]()
Not working though
|
#4
|
|||
|
|||
![]()
Usually good manners to post a LINK to other peoples code or at least add a reference to where it came from.
In any case that code is for pre 2007. There's no simple way to do this with the new style tables in 2007 onwards. You would need to copy each attribute eg fill, border, text size etc and apply it to the new tables UNLESS you want the new tables to take on one of the existing Microsoft styles when it is a lot easier. |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
ubns | Word Tables | 1 | 08-14-2012 11:51 PM |
![]() |
mjcoon | Word Tables | 20 | 04-28-2012 08:53 PM |
![]() |
korric | Word | 1 | 04-08-2012 05:31 AM |
![]() |
flds | Word VBA | 40 | 07-16-2011 07:34 AM |
![]() |
markg2 | Word Tables | 3 | 01-16-2010 06:43 PM |