VBA in Powerpoint

Joined
Jan 17, 2012
Messages
4
Reaction score
0
I am working on an application to create a script (in Word) from an animated Powerpoint presentation. The sound-track for the presentation is considerably more complex than a simple narration, so I need a working script document. My approach is to create a table (in Word) with all the Notes pages as rows in the table - the text from the notes page actually constitutes one of seven columns in the table.

The overall approach is as follows:
Code:
For each Slide in Presentation
      If Slide.HasNotesPage then
         ProcessNotesPage
      End if
Next Slide
The problem comes when I am taking the text on the notes page and splitting it into several chunks. I am not able to create a new Textrange object without simply setting it equal to an existing object. So, for example:

Code:
'  copy the NotesPage text into a local variable
set NotesText=slide.notespage.shapes(3).textframe.textrange
'   preserve the copy, and create a working copy, which I can cut up
set WorkText=NotesText

'   Now I need a 'blank' Textrange to be the destination of the chunk of 
'   NotesPage that I'm working with
set ScriptBlock = new textrange
This doesn't work!:mad:
However, if I simply make yet another copy, ie set ScriptBlock=WorkText, all of the objects are pointing to the same place - the text in the slide - and if I change one of them, they all change!

Word has the duplicate method, but I can't find anything like that in Powerpoint.
I also can not create a new Word Range object - which I think would at least help because I'm more familiar with those objects.

Any ideas?

Thanks,

Tony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top