• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA create ppt

geotzi

New Member
Hi all,

I have assigned a VBA code to create an automatic presentation for my output spreadsheets.

The macro creates the ppt with all the slides. When the macro is about to stop running the ppt disappears. I dont either receive an error but i only miss the ppt slides.

I have attached the code below. Do you think that there is an error or a missing line of the code that creates this?

Thank you in advance

Georgia.
 

Attachments

  • Public Sub create.docx
    14.3 KB · Views: 0
Hi,

I didn't looped much in the code but let me explain these three lines..

ppo_pres.SaveAs str_pwd & "BPO Levers P2 " & Cover.Range(PURSUIT_NAME).Value & ".pptx", ppSaveAsDefault, msoTrue

Saving the PPT

ppo_pres.Close

Closing the PPT

ppo_app.Quit

Closing the instances of the PPT Application.

So ,remove these two lines & check..

Code:
 'ppo_pres.Close
  'ppo_app.Quit

Attached xl might be useful too..
 

Attachments

  • ExcelToPowerPoint_word.xlsm
    111 KB · Views: 0
Hi,

I didn't looped much in the code but let me explain these three lines..



Saving the PPT



Closing the PPT



Closing the instances of the PPT Application.

So ,remove these two lines & check..

Code:
 'ppo_pres.Close
  'ppo_app.Quit

Attached xl might be useful too..

Hi Deepak

I will do something like this in near future. I tried to run your code but
this line

Code:
 PPSlide.Shapes.Paste.Select

returns run time error

Why is it so ?
 
Hi Deepak

I will do something like this in near future. I tried to run your code but
this line

Code:
 PPSlide.Shapes.Paste.Select

returns run time error

Why is it so ?

First, there aren't written by me!!
Just checked & found working without any error.
 
Hi,

I didn't looped much in the code but let me explain these three lines..



Saving the PPT



Closing the PPT



Closing the instances of the PPT Application.

So ,remove these two lines & check..

Code:
 'ppo_pres.Close
  'ppo_app.Quit

Attached xl might be useful too..
Thanks a lot. It works fine!
 
Back
Top