[PowerPoint] Text inserted into textbox won't autosize to fit box in slideshow view
I have a textbox in my PPT presentation that I am populating with text depending on user inputs in comboboxes. however this text will not resize to fit in the textbox until it is viewed in the normal view window. Any ideas why this might be happening, or how to solve the issue? I have tried refreshing the slideshow using:
SlideShowWindows(1).View.GoToSlide(SlideIndex)
It works if I do this:
SlideShowWindows(1).View.Exit
MsgBox "Closed"
ActivePresentation.SlideShowSettings.Run
but only with the msgbox - without it, it doesn't spend enough time in the normal view to autosize the textboxes. Also, ideally I wouldn't want to have to refresh the presentation
This is my current coding for the text box autoshape (R being the text box, Results being a string)
With R.TextFrame
.MarginTop = 0
.MarginBottom = 0
.MarginLeft = 0
.MarginRight = 0
End With
With R.TextFrame2
.WordWrap = True
.AutoSize = msoAutoSizeTextToFitShape
.TextRange.Text = Results
End With