Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 12-04-2019, 10:15 AM
mikejvir mikejvir is offline VBA - (Re-) Setting a Table Style Windows 10 VBA - (Re-) Setting a Table Style Office 2016
Novice
VBA - (Re-) Setting a Table Style
 
Join Date: Nov 2019
Posts: 11
mikejvir is on a distinguished road
Default

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

Code:
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

Code:
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

Code:
If oSh.HasTable Then
  Set oTbl = oSh.Table
  oTbl.ApplyStyle ("{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"), False
End If
Michael Virostko
Reply With Quote
 

Tags
slide, table, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA - (Re-) Setting a Table Style Changing the indent setting of automatic numbering in my default style numberinggg Word 3 09-18-2015 12:34 PM
Setting up a default style sheet mred2 Word 7 05-08-2015 02:08 PM
VBA - (Re-) Setting a Table Style how to apply table style WITHOUT setting it as a table? dylansmith Excel 9 05-16-2014 07:25 PM
VBA - (Re-) Setting a Table Style setting style defaults in 2010 Howard Word 2 01-03-2013 01:12 PM
VBA - (Re-) Setting a Table Style Style seems to inherit bold setting from previous style Jennifer Murphy Word 3 02-16-2012 04:18 PM

Other Forums: Access Forums

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