![]() |
|
#1
|
|||
|
|||
|
Hi,
With this code, you can autofit shapes to fit slide width, but it requires to put your dimension (Left, width), which may be not suitable when changing your slide size, it will require setting a new dimension So how to make shapes autofit slide width without setting the dimension each time? Thanks Code:
Sub TextBoxAutoFitWidth4All()
'set the variables
Set pst = ActivePresentation
'start the loops
For Each osld In pst.Slides
For Each oshp In osld.Shapes
pass = 1
'check if we want to skip the shape
If oshp.HasTextFrame = msoFalse Then pass = 0
'we can add as many as we want here in case there is more criteria needed
If pass = 1 Then
With oshp
.LockAspectRatio = False
.Left = 15
.Width = 900
End With
End If
Next oshp
Next osld
End Sub
|
|
#2
|
|||
|
|||
|
I am sorry
![]() I solved the problem by using Code:
.Width = ActivePresentation.PageSetup.SlideWidth |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to make custom shapes??? | gkeddie | Drawing and Graphics | 0 | 07-30-2017 07:28 PM |
| Set tables in email to default to "AutoFit Column Width"? | viper92283 | Outlook | 0 | 02-26-2014 03:31 PM |
| Is there a way to make a table in a header match the width of the page always? | trueimage | Word | 1 | 10-03-2013 06:13 PM |
| All Shapes on slide | excelledsoftware | PowerPoint | 9 | 09-15-2013 04:03 AM |
How to make the Caption and its text have the same width as the table?
|
Jamal NUMAN | Word | 1 | 04-24-2011 06:44 PM |