Running PPP from Access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does any one knows what parameter to send to PowerPnt.exe from access to run
PP and automatically start the Show View (not using PPTView)?

I'm using this code:

Dim stAppName As String
Dim File_Path As String

File_Path = Me!DirPath.Value
stAppName = "PowerPnt.exe " & "/s " & File_Path
Call Shell(stAppName, vbNormalFocus)

But it opens the PPT without option to edit it.
 
Does any one knows what parameter to send to PowerPnt.exe from access to run
PP and automatically start the Show View (not using PPTView)?

I'm using this code:

Dim stAppName As String
Dim File_Path As String

File_Path = Me!DirPath.Value
stAppName = "PowerPnt.exe " & "/s " & File_Path
Call Shell(stAppName, vbNormalFocus)

But it opens the PPT without option to edit it.

I'm confused. Do you want to start the presentation in Normal view, so you can
edit it, or in Slide Show view, which does NOT let you edit?
 
I want the PowerPnt to open the file as edit and a macro that lauch the show
after loading the file.
 
I want the PowerPnt to open the file as edit and a macro that lauch the show
after loading the file.

This still isn't making any sense to me.
Let's go at it differently:

When you run your code, do you want to see:

A slide show

or

PowerPoint opening the file for editing, ie, in Normal view
 
Thanks Steve to take the time to deal with this Venezuelan Red-neck :)
Let's show you my case:
1- I have many PP with songs, each PP have a song. (for a church. Song
Improvisation)
2- The PP files/DirPath are registered in a DB, so when I search it and
press the link of the song, Access launches PowerPnt and show the song.
3- But some time one have to make changes to the PP on the fly, o I have to
open PowerPnt in Edit mode in order to do that, while it is shown.

So, is there any way that after Access launches PowerPnt in Edit mode,
PowerPnt runs a macro to Show de Slide (F5)?
Hope this is clean :-/
 
Thanks Steve to take the time to deal with this Venezuelan Red-neck :)
Let's show you my case:
1- I have many PP with songs, each PP have a song. (for a church. Song
Improvisation)
2- The PP files/DirPath are registered in a DB, so when I search it and
press the link of the song, Access launches PowerPnt and show the song.
3- But some time one have to make changes to the PP on the fly, o I have to
open PowerPnt in Edit mode in order to do that, while it is shown.

So, is there any way that after Access launches PowerPnt in Edit mode,
PowerPnt runs a macro to Show de Slide (F5)?
Hope this is clean :-/

Aha! Thanks for your patience, Gus. Now I understand.

Bill Dilworth does this kind of thing (editing while the show is running) so let's see
what he has to say.

In the meanwhile, give this a try; it opens a presentation, runs a macro within the
presentation, then closes it.


Sub RunMacro()

Dim oPPTApp as PowerPoint.Application
Dim oPPTPres as PowerPoint.Presentation

Dim sPath as String
sPath = "C:\Path\To\File\"

Dim sPresentationFile as String
sPresentationFile = "PPTFile.PPT"

' Start PPT/get a reference to it
Set oPPTApp = New PowerPoint.Application
' Make it visible
oPPTApp.Visible = True

' optionally
DoEvents ' repeat if needed

' Open the PPT file
Set oPPTPres = oPPTApp.Presentations.Open(sPath & sPresentationFile)

' Run the macro named PPTSub in the file we just opened
' ex: oPPTApp.Run "MyFile.PPT!Module1.SubName"
oPPTApp.Run sPresentationFile & "!" & "Module1.PPTSub"

oPPTPres.Close
oPPTApp.Quit

Set oPPTPres = Nothing
Set oPPTApp = Nothing

End Sub
 
Sorry my ignorance, but how/where do I write the macro "Module1.PPTSub", and
what does it does?
:-(
 
Sorry my ignorance, but how/where do I write the macro "Module1.PPTSub", and
what does it does?
:-(

You'd add that to the PPT file you're opening; what would you put in it?
That will depend on what's needed to launch the show once it's edited (or while it's beeing
edited). We're waiting for our friend Bill D to show up with that answer.

Over to you, Bill
 

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

Back
Top