Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-31-2012, 06:20 PM
efilipe efilipe is offline Copy table format Windows 7 32bit Copy table format Office 2010 32bit
Novice
Copy table format
 
Join Date: Aug 2012
Posts: 3
efilipe is on a distinguished road
Default Copy table format

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
Reply With Quote
  #2  
Old 08-31-2012, 06:42 PM
efilipe efilipe is offline Copy table format Windows 7 32bit Copy table format Office 2010 32bit
Novice
Copy table format
 
Join Date: Aug 2012
Posts: 3
efilipe is on a distinguished road
Default

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
Reply With Quote
  #3  
Old 08-31-2012, 06:43 PM
efilipe efilipe is offline Copy table format Windows 7 32bit Copy table format Office 2010 32bit
Novice
Copy table format
 
Join Date: Aug 2012
Posts: 3
efilipe is on a distinguished road
Default

Not working though
Reply With Quote
  #4  
Old 09-01-2012, 01:46 AM
JohnWilson JohnWilson is offline Copy table format Windows 7 64bit Copy table format Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

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.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy table format Table format change ubns Word Tables 1 08-14-2012 11:51 PM
Copy table format Table copy/paste suddenly text-only mjcoon Word Tables 20 04-28-2012 08:53 PM
Copy table format Copy Paste ruins format korric Word 1 04-08-2012 05:31 AM
Copy table format Copy/Paste/Delete Table & Section etc. flds Word VBA 40 07-16-2011 07:34 AM
Copy table format Table format $ markg2 Word Tables 3 01-16-2010 06:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:59 PM.


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