Insert selected text file after existing text in PowerPoint
I have created a macro in PowerPoint that does the following: User clicks
text frame on the slide. It names the frame and opens a dialog for them to
choose from a list of text documents. They choose one and the text is read
and inserted into the named text frame.
Here's the insert part of the code:
Dim file As Object
Dim Text As String
Set file =
CreateObject("Scripting.FileSystemObject").OpenTextFile(vrtSelectedItem,
1)
Text = file.ReadAll
oShape.TextFrame.TextRange.Text = Text 'Insert the text into the text frame
The problem I have is that it clears any existing text in the frame,
instead of adding to it. I really need to add the newly selected text
after any existing content in the frame. For instance, if they are adding
in a selection of quotes, they need to add one after the other.
Can anyone advise on ways of doing this?
No comments:
Post a Comment