473,321 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

controlling Ms Powerpoint Slide show using Vb.net

hi all,

i want to run the slide show say ten slides and then close it , but in my code given below it opens the slide show and closes immediately ... ..
please give me a solution to this problem

1. Please add MsPowerpoint11.0 object present in COM in ur references.

2. Code : --
Expand|Select|Wrap|Line Numbers
  1. Dim appPowerpoint as Powerpoint.Application 
  2. dim book as Powerpoint.presentation 
  3. dim slide as powerpoint.slides 
  4. dim picture as powerpoint.sliderenge 
  5. dim path as string ' location of the file  
  6.  
  7. appPowerpoint = new Powerpoint.Application
  8. appPowerpoint.Active( )
  9. appPowerpoint.NewPresentation.add(1,,) 
  10.  
  11.  path  = "d:\x.ppt"
  12.  
  13. appPowerpoint.presentation.open(path,commes automatically(select the first choice),commes automatically(select the first choice))
  14.  
  15. appPowerpoint.activePresentation.slideshow.run() 
  16.  
  17. '........
  18. ....... some code is   needed so that i  run the slide show say 10 slides and then  close it 
  19. .......
  20.  
  21. but 
  22. 'it quits immediately ........  
  23.  
  24. appPowerpoint.activePresentation.close
  25. appPowerpoint.windows.application.quit
please reply back as soon as possible...


with thanks,
mumbaisalsa
Nov 17 '07 #1
1 13862
i got the solution to the problem ... .
appPowerpoint.ActivePresentation.SlideShowSettings .Run.View.GotoSlide(i, Microsoft.Office.Core.MsoTriState.msoCTrue = Microsoft.Office.Core.MsoTriState.msoCTrue)

added the above code and it works .......
thanks
mumbaisalsa

i want to run the slide show say ten slides and then close it , but in my code given below it opens the slide show and closes immediately ... ..
please give me a solution to this problem

1. Please add MsPowerpoint11.0 object present in COM in ur references.

2. Code : --
Expand|Select|Wrap|Line Numbers
  1. Dim appPowerpoint as Powerpoint.Application 
  2. dim book as Powerpoint.presentation 
  3. dim slide as powerpoint.slides 
  4. dim picture as powerpoint.sliderenge 
  5. dim path as string ' location of the file  
  6.  
  7. appPowerpoint = new Powerpoint.Application
  8. appPowerpoint.Active( )
  9. appPowerpoint.NewPresentation.add(1,,) 
  10.  
  11.  path  = "d:\x.ppt"
  12.  
  13. appPowerpoint.presentation.open(path,commes automatically(select the first choice),commes automatically(select the first choice))
  14.  
  15. appPowerpoint.activePresentation.slideshow.run() 
  16.  
  17. '........
  18. ....... some code is   needed so that i  run the slide show say 10 slides and then  close it 
  19. .......
  20.  
  21. but 
  22. 'it quits immediately ........  
  23.  
  24. appPowerpoint.activePresentation.close
  25. appPowerpoint.windows.application.quit
please reply back as soon as possible...


with thanks,
mumbaisalsa
Nov 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ata | last post by:
Hello, I am trying to copy the contents of the output of SQL Reporting Services to a PowerPoint slide. For this, I am using SQL Reporting Services to obtain an IMAGE stream, which I paste to the...
9
by: Michael Burtenshaw | last post by:
I would like to make a slide show using random images. The problem is my host is 250.com, and they don't support cgi-programs. Is there another way to accomplish random images?
0
by: ProfessorKaos | last post by:
I'm trying to open a slide show from an application but I am receiving an error when tring to reference the PowerPoint.Presentation object. I'm not sure if it a framework, registry, or version...
0
by: denvercr | last post by:
Hi Guys, If you can help me on this problem, how can i possibly call or run a powerpoint slideshow when clicking a button in an asp.net page? Thank you guys for your assistance..
0
by: Czechfish | last post by:
How do I change my script to automatically play, rather than clicking through individual slides? What is the action script to skip to a specific slide in the show via a button? (Right now I have...
1
by: bsg92150 | last post by:
i have a task that requires me to provide a web use with the ability to send teh current page to a power point slide. and to further complicate matters. the user may want to put the whole site...
5
by: ZEBEDEE | last post by:
i am creating a powerPoint like software using VB6, and i cannot implement the idea of having a multiple slide in my project,,,, can somebody help regarding my problem,, tnx a lot :)
0
by: impin | last post by:
i have a created a blog in blogspot. i want add a photo slide show in the blog... so i created a photo slide show using flash, xml and style sheets with my own photos... is it possible to add...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.