Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

commands for power point 1

Status
Not open for further replies.

eugene2

IS-IT--Management
Apr 2, 2001
43
0
0
US
trying to launch powerpoint slideshow with vbscript. it will launch application, but I have been unable to run the slideshow itself. any help or directions to find information will be appreciated.
 
I took a look at the website that I went to, but it did not have what I needed to make it work, it still launches power point but, not the slide show. I have listed the filename in the script, but it doesn't launch, Perhaps I am not using correct way to call up a powerpoint slide, I was thinking that it would be the same as bringing up a document in winword, or an image file using Paint or similar program. if different. I have read documentation from MS website, but can't seem to find the information that I was looking for. I am new to scripting, so error is probably mine. I apppreciate any ideas.Thanks
 
Can you post a snippet of your code launching the slideshow ?
 
Dim FileName

FileName = "D:\My Documents\test.pps"

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "Powerpnt"
WScript.Sleep 100
WshShell.AppActivate "Powerpnt"
WScript.Sleep 100
WshShell.SendKeys "%fO"
WScript.Sleep 100
WshShell.SendKeys FileName & "~"
 
Try this-->

Dim wsh
Set wsh = CreateObject("Wscript.Shell")
wsh.Run "powerpnt /s C:\Temp\test.ppt"

Rich Bateman
American Bank of Texas
select * from Life where Brain is not null

 
no luck, but thanks. I tried with and without settting FileName.
 
Make sure you have the /s after powerpnt. that is the switch that tells power point to run the slide show. on this line
WshShell.Run "Powerpnt"
needs to be
WshShell.Run "Powerpnt /s filename "



Rich Bateman
American Bank of Texas
select * from Life where Brain is not null

 
thanks, that worked, I had to move the file to the root,it did not like going thru extra directory. I thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top