Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-14-2016, 01:49 AM
macropod's Avatar
macropod macropod is offline Copy + Pasting Excel Tables in word have 8pt spacing Windows 7 64bit Copy + Pasting Excel Tables in word have 8pt spacing Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,511
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

There is no setting to make the tables autofit the pauge. However, you could use a macro like the following and assign it to a keyboard shortcut, then run it on the table you've just inserted:


Code:
Sub FitTable()
With Selection
  If .Information(wdWithInTable) = True Then
    With .Tables(1)
      .AllowAutoFit = False
      .PreferredWidthType = wdPreferredWidthPercent
      .PreferredWidth = 100
    End With
  End If
End With
End Sub
This is more flexible than using a fixed width, as it allow the table to resize to fit whatever margins & page layout you're using (such as when changing between portrait and landscape).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 01-14-2016, 05:43 PM
Jiing Chiang Jiing Chiang is offline Copy + Pasting Excel Tables in word have 8pt spacing Windows 10 Copy + Pasting Excel Tables in word have 8pt spacing Office 2016
Novice
Copy + Pasting Excel Tables in word have 8pt spacing
 
Join Date: Jan 2016
Location: Australia
Posts: 11
Jiing Chiang is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
There is no setting to make the tables autofit the pauge. However, you could use a macro like the following and assign it to a keyboard shortcut, then run it on the table you've just inserted:
Code:
Sub FitTable()
With Selection
  If .Information(wdWithInTable) = True Then
    With .Tables(1)
      .AllowAutoFit = False
      .PreferredWidthType = wdPreferredWidthPercent
      .PreferredWidth = 100
    End With
  End If
End With
End Sub
This is more flexible than using a fixed width, as it allow the table to resize to fit whatever margins & page layout you're using (such as when changing between portrait and landscape).
Thank you so much for you help. It worked perfectly!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy + Pasting Excel Tables in word have 8pt spacing Copy tables and transpose them from Word to Excel Story11 Word VBA 2 01-18-2015 07:28 AM
Pasting tables from Excel 2010 into Word 2010 - How to fix column widths? GracieB Word 7 10-02-2013 06:24 AM
copying and pasting Excel tables into Word derohanes Word 1 01-24-2013 12:07 AM
how to copy all ms word tables into excel rehan129 Word 0 01-28-2012 10:17 AM
Copy + Pasting Excel Tables in word have 8pt spacing help Copy from excel and pasting as a metafile in powerpoint Juiceapple Office 1 09-15-2009 09:52 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:08 PM.


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