Add a Slide Module to the VBE with VBA

S

scotty.addams

I would like to be able to programmatically create a PowerPoint Slide
object in the Visual Basic Environment. Since this code will need to
reside within or be activated by the slide, I would like to know how to
programmatically add a Slide Module to the Visual Basic Editor. I
already know how to add code to an already existing Slide Module from a
remote application, but not how to add the actual Module. I thought
that by adding a new slide the corresponding code module would be
created. Below is the code I use to add code from another application.
Trying to use the Add method ends with no results; no error or Slide
Code page.

objPPTApp.VBE.VBProjects("PPTWeb").VBComponents(1).CodeModule.InsertLines(1,
strCode)
 

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