Consulting

Results 1 to 2 of 2

Thread: Split the selected Table by every single Row by VBA

  1. #1

    Unhappy Split the selected Table by every single Row by VBA

    How to split the selected Table by every single Row by VBA. Many Thanks!


    Original
    Sample question .docxSample question.jpg




    Final outcome as below
    Sample (Final Outcome).docxSample question (final1).jpg

  2. #2
    That's simple enough
    Sub Split()
    Dim oTable As Table
    Dim lRow As Long
        Set oTable = Selection.Tables(1)
        For lRow = oTable.Rows.Count To 1 Step -1
            oTable.Rows(lRow).Select
            Selection.SplitTable
        Next lRow
        Set oTable = Nothing
    End Sub
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •