How Do I Clear the KeepWithNext Flag on Every Pragraph in a Table Except For the One in Table Header?

Howdy,
I am trying to clear the KeepWithNext flag for all the paragraphs in every table in the document but the ones in table headings.
What's the best way to do that.
At the moment I only have the following script that clears the KeepWithNext flag for every paragraph in every table.
Sub ClearKeepWNext()
Dim t As Table
For Each t In ActiveDocument.Tables
t.Range.ParagraphFormat.KeepWithNext = False
t.AutoFitBehavior (wdAutoFitContent)
Next
End Sub
This results in table headers split so that many tables have only the table header at the bottom of the page where all other table rows start on the text page.
What would be the best way to fix that?
Thank you in advance.
Well this is the world we live in And these are the hands we're given...

Try:
Sub ClearKeepWNext()
Dim Tbl As Table, i As Long
For Each Tbl In ActiveDocument.Tables
  With Tbl
    .Range.ParagraphFormat.KeepWithNext = False
    For i = 1 To .Rows.Count
      With .Rows(i)
        If .HeadingFormat = True Then
          .Range.ParagraphFormat.KeepWithNext = True
        Else
          Exit For
        End If
      End With
    Next
  End With
Next
End Sub
If the tables only have a single heading row, you could instead use:
Sub ClearKeepWNext()
Dim Tbl As Table
For Each Tbl In ActiveDocument.Tables
  With Tbl
    .Range.ParagraphFormat.KeepWithNext = False
    With .Rows(1)
      If .HeadingFormat = True Then
        .AllowBreakAcrossPages = False
      End If
    End With
  End With
Next
End Sub
Cheers
Paul Edstein
[MS MVP - Word]

Similar Messages

  • How can I quit my iPhoto screen that as crashed and locked on. The locked screen has no iPhoto file list on the left and the part of the screen that should have uploaded photos is blank except for the rotating download icon in the centre of screen. Help?I

    My SD card reader has caused my iPhoto screen to be locked with no list of files on the lefthand side and a blank main photo area apart from the rotating download icon operating in the centre of the photo part of the screen.
    I have tried to quit iphoto but when I restart it the same locked screen appears.
    I believe I caused this problem when I removed my SD device without first ejecting it when the blank screen appeared without downloading my new photos.
    Can anyone help a 66 year old computer illiterate fool ?.
    Regards

    Use Force Quit (under the Apple menu at the top) to close iPhoto.  Then try opening it again.  If it locks up again force quit and try this:  launch iPhoto with the Option key held down and create a new, test library.  Import some photos and check to see if the same problem persists.
    If the problem does not persist try the following: make a temporary, backup copy (select the library and type Command+D) and  apply the two fixes below in order as needed:
    Fix #1
    Launch iPhoto with the Command+Option keys held down and rebuild the library.
    Since only one option can be run at a time start with Option #1, followed by #3 and then #4 as needed.
    Fix #2
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the File ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments but not books, calendars or slideshows. The original library will be left untouched for further attempts at fixing the problem or in case the rebuilt library is not satisfactory.
    If the problem persists in the test library do the following:  make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
    1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
         User/Home()/Library/ Preferences folder.
    2 - delete iPhoto's cache file, Cache.db, that is located in your
         User/Home()/Library/Caches/com.apple.iPhoto folder. 
    Click to view full size
    3 - launch iPhoto and try again.
    NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto.  You'll also have to reset the iPhoto's various preferences.
    OT

  • My iPhone 4S turned itself off and when it came back on the screen is completely blue. It still works except for the screen. Help please!

    My iPhone wont work because of the screen but it still vibrates, makes noise, and turns on and off. Can apple either restore my phone or is there something else that can be done?

    Standard troubleshooting...
    1. Try a Restart by pressing the sleep/lock button until you see the slider.  Slide to power off.  Restart by pressing the sleep/lock button until you see the Apple logo.
    2. Try a Reset by pressing the home and sleep buttons until you see the Apple logo, ignoring the slider if, it comes up. Takes about 5-15 secs of button holding and you won't lose any data or settings.
    3. Remove all apps from Recently Used list...
    - From any Home Screen, double tap the home button to bring up the Recents List
    - Tap and hold any icon in this list until they wiggle
    - Press the red (-) to delete all apps from this list.
    - Press the home button twice when done.
    4. If still a problem restore with your backup.
    5. If still a problem restore as new, i.e. without your backup. See how it runs with nothing synced to it.
    6. If still a problem, it's likely a hardware issue.

  • I have an Ipad 2 and here is what I am trying to accomplish.  On my laptop I connect to a remote desktop connection to access a shared program we use for reporting.  How do I set up my Ipad to access this remote server?  Thanks for the help.

    I have an Ipad 2 and here is what I am trying to accomplish.  On my laptop I connect to a remote desktop connection to access a shared program we use for reporting.  How do I set up my Ipad to access this remote server?  Thanks for the help.

    Close ... before going for a specific Cisco app ... lets find out some details:
    Host we need more details:
    What is your server environment (Windows Server, or Mac OS X Server, or Linux)?
    What security is implemented in your environment - as what is restricted (RDP for all or specifc credentials on all machines? Are you part of local admin group to the server you wish to connect)?
    Does your environment Support CISCO IPSec connection? If so use Settings> VPN and IPSec tab to enter VPN details, if not then go with above suggestion. IF your restricted to RSA then either built in VPN settings or 3rd party app for RSA would suffice.
    Finally, there are many RDP applications out there I use "Mocha RDP Light" (free minimal ads when launched not when connecting).

  • When I choose a song on my iPhone 5c, it deletes them all except for the ones I have purchased off of iTunes. How do I fix this and why is it happening?

    Ok. So if you didn't know, there are some sites that allow you to download music for free legally. For example many industry artists release "free albums" or "mixtapes" just for their fan base. They are uploaded by the actual artists themselves and downloaded by millions of fans. However when I choose to play one on my iPhone 5c, all of them get deleted except for the iTunes purchased songs. This has never happened before and I would like to know why it is happening now, and how to fix it.
    Thanks.

    Hello yung ron,
    It may be that your iPhone's set to sync automatically, which can potentially remove any music that's been added to the device. It may help to set the device to 'manual mode,' so that you have complete and total control over what content is on the device.
    Managing content manually on iPhone, iPad, and iPod
    http://support.apple.com/kb/HT1535
    Cheers,
    Allen

  • HT1977 I purchased a game on my ipod touch. I restored the device to factory settings last night and when I synced all the apps back, the game is now in the demo version. How do I unlock it ? I hope I don't need to pay for the full version again.

    I purchased a game on my ipod touch. I restored the device to factory settings last night and when I synced all the apps back, the game is now in the demo version. How do I unlock it ? I hope I don't need to pay for the full version again.

    PES 2012 is no longer available in the US App Store and only on the British App Store currently.
    http://pes-2012.en.softonic.com/iphone
    That (an app no longer available) happens sometimes.
    Your only way is if you have the appt on your computer such as in the recycle bin/trash or in a computer file backup. In that case move it to your iTunes library and sync.

  • How do you suppress page numbers. I am trying to print a screenplay for the first time since switching to Pages and I can't suppress Page

    How do you suppress page numbers. I am trying to print a screenplay for the first time since switching to Pages and I can't suppress Page #1 without making the rest of the pages inaccurate, as page #1 is the Title Page. Does anyone have any suggestions?

    When you signed to be able to post in the forums, you were urged to read and accept the Terms of Use ruling these forums.
    They claim :
    The contents of the "More Like This" box prove that applying the rules you would have get the wanted explanations without creating this new thread.
    Yvan KOENIG (VALLAURIS, France) mardi 26 avril 2011 10:04:03

  • How to find table name for the fields from Standard Extractor in CRM system

    How to find table name of fields from the standard extractor in CRM system ?
    e.g. We use LBWE TCode in R/3 system to find table name for the field from Extractor VCSCL(e.g.).
    Likewise is there any way to find table name for the fields from Standard extractor like 0CRM_LEAD_I.

    Hi ,
    Please find the link below for understanding BW CRM analysis.
    http://help.sap.com/bp_biv135/html/bw.htm
    activate the CRM DSs by scenario:
    1) Activate the application component hierarchy (tcode RSA9). Changes made to the application component hierarchy in the CRM system can be transferred to the BW using the "Edit Application Component Hierarchy" (SBIW - Postprocessing of DataSources).
    SAP Note 434886 must be implemented in CRM 3.0 before the application component hierarchy is activated.
    2) Activate the Business Content DataSources (tcode RSA5).
    Select/enter the application component and choose Execute (F8).
    To compare the shipped and active versions, choose the 'Select Delta' pushbutton. If there is no active version of the DataSource, it is selected automatically.
    To activate the shipped version, choose the 'Transfer DataSources' pushbutton.
    3) Management of the versions of the BW-Adapter metadata (tcode BWA5). All DataSources are displayed that are managed by the BW Adapter.
    As in transaction RSA5 (Service API Metadata Activation), the 'Select Delta' function can be used to select the inactive DataSources or compare shipped and active versions.
    You can also go directly to the screen for maintaining DataSources that are managed by the BW Adapter.
    The 'Compare Version' function makes a detailed comparison of the shipped and active versions.
    All BW-Adapter metadata is considered when versions are compared:
    Header information (Table SMOXHEAD)
    Mapping information (Table SMOXRELP)
    Global selection conditions (Table SMOXGSEL)
    Attribute key fields (Table SMOXAFLD)
    Hope this helps.
    Regards,
    csm reddy

  • Hi, Can anyone recommended software to import dvd to iMovies. I need to import about a dozen homemade DVD's and edit them into a single DVD comprising the 'best bits'. How best can I do this. I have an external hard drive available for the job

    Hi, Can anyone recommended software to import dvd to iMovies. I need to import about a dozen homemade DVD's and edit them into a single DVD comprising the 'best bits'. How best can I do this. I have an external hard drive available for the job

    You need to convert the VOB files in the TS-Folder of the DVD back to DV which iMovie is designed to handle. For that you need mpegStreamclip:
    http://www.squared5.com/svideo/mpeg-streamclip-mac.html
    which is free, but you must also have the  Apple mpeg2 plugin :
    http://store.apple.com/us/product/D2187Z/A/quicktime-mpeg-2-playback-component-f or-mac-os-x
    (unless you are running Lion in which case see below))
    which is a mere $20.
    Another possibility is to use DVDxDV:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.overview.htm
    which costs $25.
    For the benefit of others who may read this thread:
    Obviously the foregoing only applies to DVDs you have made yourself, or other home-made DVDs that have been given to you. It will NOT work on copy-protected commercial DVDs, which in any case would be illegal.
    And from the TOU of these forums:
    Keep within the Law
    No material may be submitted that is intended to promote or commit an illegal act.
    Do not submit software or descriptions of processes that break or otherwise ‘work around’ digital rights management software or hardware. This includes conversations about ‘ripping’ DVDs or working around FairPlay software used on the iTunes Store.
    If you are running Lion or later:
    From the MPEG Streamclip homepage
    The installer of the MPEG-2 Playback Component may refuse to install the component in Lion. Apple states the component is unnecessary in Lion onwards, however MPEG Streamclip still needs it. See this:
    http://support.apple.com/kb/HT3381
    To install the component in Lion, please download MPEG Streamclip 1.9.3b7 beta above; inside the disk image you will find the Utility MPEG2 Component Lion: use it to install the MPEG-2 Playback Component in Lion. The original installer's disk image (QuickTimeMPEG2.dmg) is required.
    The current versions of MPEG Streamclip cannot take advantage of the built-in MPEG-2 functionality of Lion. For MPEG-2 files you still need to install the QuickTime MPEG-2 Playback Component, which is not preinstalled in Lion. (The same applies to Mountain Lion even though that has it preinstalled.) You don't have to install QuickTime 7.

  • My iPad screen is blank except for the service and battery symbol.  Any ideas how I can fix this?

    My Ipad screen is blank except for the service and battery symbols. Any ideas how I can fix this please?

    Try restarting
    Hold down the Sleep/Wake button and the home button together until the apple logo appears (ignore the ON/OFF slider) then let both buttons go and wait for phone to restart (no data will be lost).

  • TS1717 i checked into itunes on my pc and noticed that all the songs in my library were erased, except for the songs i had purchased... why??? how do i get them reloaded into my pf

    as i said, i checked onto itunes on my pc and noticed all the songs i had in my library had been erased, except for the songs i had purchased on itunes...how do i retrieve my songs...??

    See this post.
    tt2

  • Hi, All the information that I had on my desktop has gone, except for the hard drive logo, how can I get it back please?

    Hi, Can anyone help please, I have lost everything that was displayed on my desktop, except for the Mac HD, and I do not know how to retrieve it

    Hi Ronda,
    Thank you for the reply, underneath the hard drive logo, it says 55.77GB. 12.88GB free, do you think that it is too full? if so, what do I do to reduce it, you can probably tell computers are not my best subject. I include the Hardware overview, I hope that this helps
    Hardware Overview:
      Machine Name: iBook G4
      Machine Model: PowerBook6,7
      CPU Type: PowerPC G4 (1.1)
      Number Of CPUs: 1
      CPU Speed: 1.42 GHz
      L2 Cache (per CPU): 512 KB
      Memory: 512 MB
      Bus Speed: 142 MHz
      Boot ROM Version: 4.9.3f0
    Best wishes
    Ragmah

  • Need Table Name for the Approval Flag in the Transaction IQS2

    In the Transaction IQS2 i  gave a notification number and press Enter, then I clicked the Approval Button  to Approve it.
    I want to Know in which Table the Approval Flag is set. Because I want to set the Flag in background when an action performed. I searched for  BAPI to do this, but I unable to found it.
    If any know the Table Name or BAPI or Function Module to set  the Approval Flag. Kindly tell me.
    Thank you,
    Regards,
    Surjith

    Hi,
    check this
    CRM_IC_SPH_CLEAR_BGFLAG        Set background-function-active flag
    i m not sure but hope u'll get some help.

  • How to find function module's and tables used for the particulat screen or TCODE?

    Hello Nation,
    I would like to know how to find the  function modules and tables used for the particular screen or TCODE or program.
    Example : I would like know the function module used in the program RDBGFT?
                     How can i find that?
    Thanks in advance ,Awaiting your reply.

    Make use of Find function  with the keyword "CALL FUNCTION".
    Make use of the same find function with the keyword "Select" to know the database tables used.
    Regards,
    Philip.

  • Hi how I get the refund from the unauthorised in app purchase? I just bought the phone n had yr staff do the personal setup n end up I had been charged for the in apps purchased

    Hi how I get the refund from the unauthorised in app purchase? I just bought the phone at yr store few days ago n had yr staff do the personal setup n end up I had been charged for the in apps purchased. Pls help.

    yr store few days ago n had yr staff do the personal setup n end up I had been charged for the in apps purchased. Pls help.
    NOT at mine or anyone else's  here
    This is a User to User technical support community .There is no-one from Apple here and Apple neither read nor respond here
    Did you not work that out when you agreed to the terms of use of this community when joining today

Maybe you are looking for

  • How to recover from one corrupted redo log file in NOARCHIVE mode?

    Oracle 10.2.1. The redo log file was corrupted and Oracle can't work. When I use STARTUP mount, I got no error msg. SQL> startup mount ORACLE instance started. Total System Global Area 1652555776 bytes Fixed Size 1251680 bytes Variable Size 301991584

  • PDF files not displaying correctly

    I have adobe reader 8 and my operating system is Vista. Every time I try to view a PDF file my screen gets messed up. My color quality goes from Highest 32 bit color to the lowest setting. I then either have to reboot my system, or go into my NVIDIA

  • My d7260 control panel display is blank (black)

    this just happened yesterday after 3 years

  • Power down iMac for a few months....

    I'm going to be doing some traveling without my 24-inch iMac. It will be necessary for me to leave it unused for two or possibly three months. I do not want to prematurely drain the little 3.6-volt Pram battery because it appears that with these new

  • Shock Player has slow buffering time of 50 seconds

    i looked in add-ins for internet explorer 7 and i do not have adobe flash player but i do have shockwave flash object publisher: adobe systems incorporated, enabled, activex control, Flash10a.ocx... it is installed and active. it does not say (not ve