PDA

View Full Version : Capture Variable Text and Paste into Slide 1 Title 1



gmooney100
08-27-2021, 10:36 AM
I have a .txt file that has variable text in it.

I have my variable defined as FileContents

I then remove the last 5 characters of the FileContents via:

PPStrName = Left(FileContent, Len(FileContent) - 5)

How do I paste PPTStrName? I was thinking something like this but this line of code below was a different way of copying and pasting code vs. the use of a variable.

.Slides(1).Shapes("Title 1").TextFrame.TextRange.Paste

arnelgp
08-28-2021, 01:49 AM
ActivePresentation.Slides(1).Shapes("Title 1").TextFrame.TextRange = PPStrName