Hi Everyone,
I am trying to generate some PowerPoint slides and there is a section in my code that is not working. What I want to do is (1) remove any formatted text in Excel and paste as plain text in PowerPoint; and, (2) I want to ensure that the frame in which is pasted does not expand.
The code crashes at the AutoSize line with the "Specialized value is out of Range" error.
I would appreciate all help on this.
Thank you.
I am trying to generate some PowerPoint slides and there is a section in my code that is not working. What I want to do is (1) remove any formatted text in Excel and paste as plain text in PowerPoint; and, (2) I want to ensure that the frame in which is pasted does not expand.
VBA Code:
With .Offset(i,28).Copy
table.Rows(13).Cells(5).Shape.TextFrame2.TextRange.PasteSpecial = msoClipboardFormatPlainText
table.Rows(13).Cells(5).Shape.TextFrame2.AutoSize = msoAutoSizeTextToFitShape
End With
The code crashes at the AutoSize line with the "Specialized value is out of Range" error.
I would appreciate all help on this.
Thank you.