Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-12-2011, 08:28 AM
SCMiller SCMiller is offline Keeping Table on One Page Windows Vista Keeping Table on One Page Office 2007
Novice
Keeping Table on One Page
 
Join Date: Apr 2011
Posts: 4
SCMiller is on a distinguished road
Default Keeping Table on One Page

I'm wanted to keep each table on one page. I'm missing something here. Can someone give me some help?

Code:
Sub KeepRowsTogether()
    Dim tbl As Table
    Dim nPara As Long, i As Long
    
    For Each tbl In ActiveDocument.Tables
        nPara = tbl.Range.Paragraphs.Count
        For i = 1 To (nPara - 1)
            tbl.Range.Paragraphs(i).KeepWithNext
        Next i
    Next tbl
End Sub

Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping Table on One Page Page Numbers in Table of Contents MerRob54 Word 6 01-28-2013 03:37 AM
Keeping Table on One Page Table Jumps to Next Page donthaveaclue Word Tables 3 02-25-2011 07:54 AM
Keeping Table on One Page table spanning full page datto210 Word Tables 1 10-25-2010 12:39 PM
Keeping Table on One Page Table rows moving to new page when you don't want them to graham Word Tables 1 11-16-2009 08:51 AM
Automatically recreate table on next page oneononemedia Word Tables 0 08-16-2009 08:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:20 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