Results 1 to 4 of 4

Thread: (Re-) Set a Table Style

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    VBAX Newbie
    Joined
    Nov 2019
    Posts
    4
    Location
    Point 3

    I still have not found out how to alter all the margins in a table without using the double loop to step through every cell (that works). But on the slide I can do the following:

    Manually select the entire table on the slide.
    Right click and select Format Shape.
    Under the Size & Properties tab select Text Box.
    Edit the margins and all the cells are modified (not just one).

    There should be a way to the same operation via programming in VBA. If this is not possible I would like to know. Thanks.


    To recap the other points

    Point 1 - Reset the slide there are two solutions

    Sub Reset_Slide()
    
    Dim s As Slide
    
      Set s = ActivePresentation.Slides(ActiveWindow.View.Slide.SlideIndex)
      s.Select
      s.CustomLayout = ActivePresentation.Designs(1).SlideMaster.CustomLayouts(15)
      DoEvents
      Application.CommandBars.ExecuteMso ("SlideReset")
      DoEvents
    
    End Sub


    or

    Sub Reset_Slide2()
    
    Dim s As Slide
    
      Set s = ActivePresentation.Slides(ActiveWindow.View.Slide.SlideIndex)
      s.CustomLayout = s.CustomLayout
    
    End Sub


    Point 2 Table Reset

    If oSh.HasTable Then
    Set oTbl = oSh.Table
       oTbl.ApplyStyle ("{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"), False
    End If
    Michael Virostko
    Last edited by mikejvir; 12-04-2019 at 10:16 AM. Reason: Correction to subroutine

Tags for this Thread

Posting Permissions

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