opening a presentation from a userform

B

barn2003

hi

I would like to open a presenation from a userform (in
slideshow mode) from a parent presentation. I managed to
open a presentation from command button on a userform
button click but have the following problems:

1. nasty warnign pop-up that user has to click yes to to
proceed

2. presentation opens in editing mode

Here is the code I use on the command button:

Private Sub CommandButton1_Click()

Dim templink As String
templink = "" & ActivePresentation.Path & "\testtemp.ppt"
ActivePresentation.FollowHyperlink _
Address:=templink, _
NewWindow:=True

Unload Me
End Sub
 
S

Steve Rindsberg

hi

I would like to open a presenation from a userform (in
slideshow mode) from a parent presentation. I managed to
open a presentation from command button on a userform
button click but have the following problems:

1. nasty warnign pop-up that user has to click yes to to
proceed

What does it say, exactly?
2. presentation opens in editing mode

See if this works better:

Sub ShowMe()

With Presentations.Open("c:\full\path\to\yourfile.ppt").SlideShowSettings
.Run
End With

End Sub

Here is the code I use on the command button:

Private Sub CommandButton1_Click()

Dim templink As String
templink = "" & ActivePresentation.Path & "\testtemp.ppt"
ActivePresentation.FollowHyperlink _
Address:=templink, _
NewWindow:=True

Unload Me
End Sub

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
B

barn2003

Thanks for that.

That works a treat. I have a new problem now.

When user exits using button with 'end show' it shows the
opened presentation in editing mode. I've tried this code
but it doesn't work.

sub exitPresThatWasLuanchedFromForm()
With Application.Presentations("testtemp.ppt")
.Saved = True
.Close
End With
end sub

p.s. testtemp.ppt was presentation open from button.
-----Original Message-----
 
S

Steve Rindsberg

Another thought first ... have you tried renaming the second presentation to
whatever.PPS - that should open automatically in slide show mode and close when
the slide show ends.

Thanks for that.

That works a treat. I have a new problem now.

When user exits using button with 'end show' it shows the
opened presentation in editing mode. I've tried this code
but it doesn't work.

sub exitPresThatWasLuanchedFromForm()
With Application.Presentations("testtemp.ppt")
.Saved = True
.Close
End With
end sub

p.s. testtemp.ppt was presentation open from button.
-----Original Message-----

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
B

barn2003

hi

I'm not having any joy with that approach. Any other
ideas?

On a side issue when a presentation is opened by another
presentation using presentation.open ("somepres.ppt").
Does that open in a new window automatically over the top
of the parent or does it share the same window that
parent is in and the parent presentation is hidden.

So I'm in vba:

windows(1)

is parent presentation window and child presentation
window is

windows(2)

or

parent and child presenation are both in windows(1) but
with parent hidden until child presentation is closed?

Thanks for help so far. I realise I'm pushing my luck
with this one.
-----Original Message-----
Another thought first ... have you tried renaming the second presentation to
whatever.PPS - that should open automatically in slide show mode and close when
the slide show ends.

 
S

Steve Rindsberg

I'm not having any joy with that approach. Any other
ideas?

What happens when you try it?
On a side issue when a presentation is opened by another
presentation using presentation.open ("somepres.ppt").
Does that open in a new window automatically over the top
of the parent or does it share the same window that
parent is in and the parent presentation is hidden.

So I'm in vba:

windows(1)

is parent presentation window and child presentation
window is

windows(2)

or

parent and child presenation are both in windows(1) but
with parent hidden until child presentation is closed?

Thanks for help so far. I realise I'm pushing my luck
with this one.

Play around with this a bit:

Sub Thingie()
Dim x As Long
Presentations.Open _
("C:\Documents and Settings\Steve\My Documents\Presentation2.ppt")
For x = 1 To Windows.Count
MsgBox Windows(x).Presentation.Name
Next x
End Sub


-----Original Message-----
Another thought first ... have you tried renaming the second presentation to
whatever.PPS - that should open automatically in slide show mode and close when
the slide show ends.

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 

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