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
 
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-----
 
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.

 

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