Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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
 



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:04 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