Problem with Kiosk Mode VBA code

K

kimkom

Hi,

Currently I am using the following macro to open a presentation in Kiosk
mode from within another 'Main' presentation:


Sub LaunchInKioskMode(oSh As Shape)
Dim oPres As Presentation
Dim sPresName As String

sPresName = oSh.AlternativeText
If Len(sPresName) > 0 Then
Set oPres = Presentations.Open(sPresName, , False, False)
End If

With oPres.SlideShowSettings
.ShowType = ppShowTypeKiosk ' or ppShowTypeSpeaker etc
.LoopUntilStopped = msoFalse
.ShowWithNarration = msoTrue
.ShowWithAnimation = msoTrue
.RangeType = ppShowAll
.AdvanceMode = ppSlideShowUseSlideTimings
.PointerColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
.Run
End With

End Sub


The code was graciously provided by another member of the forums and works
fine but I am running into an issue with 'Read only' mode.

The problem is that my project is based on a network and if more than one
user tries to open the same presentation via the above method the linked
presentation will not open for the second user - nothing happens.

In the line:
Set oPres = Presentations.Open(sPresName, , False, False)

I can't specify True or False for the Read only variable because it may
already be open by another user, or it may not.

Any advice please anyone?

Thanks,
Michael
 
K

kimkom

Steve Rindsberg said:
That shouldn't matter. By specifying True for the R/O parameter, you're
telling PowerPoint "Open this presentation as Read-Only", which should be
equivalent to opening it manually, getting the "This presentation is in use
..." message and asking it to open a Read-Only copy.

Since it's R/O, PPT knows you can't write back to the original file that's
already in use, so it lets you open it.



==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


.


Hi Steve,

Thanks for the reply.

I understand what you are saying, but the fact remains that while using the
code as it stands the Read Only presentation will not open on another users
machine at the same time.

I can't understand why?

Help would be very much appreciated.
 
K

kimkom

I'm not sure what you mean here. Can you clarify?

Computer A opens the presentation first.
- Via code or manually?
- As Read/Only or not if by code?

Computer B tries to open the same presentation while A has it open.
- Via code or manually?
- If by code, using the ReadOnly parameter set to True or not?

Okay Steve, sorry for any confusion. I'll try to explain a bit better.

I have one main presentation stored on a network and accessed by all PCs,
which is opened manually in kiosk mode. This main presentation contains
links to other presentations on the same network. These links use the code I
originally posted which I think you originally provided some time ago (thank
you).

Some of these links open in Kiosk Mode and some (using a slightly modified
macro) open in Speaker Mode.

So...

Computer A opens the linked presentation via the LaunchInKioskMode(oSh As
Shape) macro.

Computer B tries to open the same linked presentation via the same
LaunchInKioskMode(oSh As Shape) macro - but nothing happens.

I have checked macro security settings on both computers and even tried
opening first on Computer B then Computer A, but same result.

I don't know if this is relevent, but in PowerPoint(2007), when I click on
View/Macros nothing is shown in the Macro list. To see the two macros
(LaunchInKioskMode and LaunchInSpeakerMode) I have to open up the Visual
Basic window via the Developer tab first.

I hope that explains the problem better. Please help!

Thanks
Michael
 
K

kimkom

Steve Rindsberg said:
OK, but have you tried it with the ReadOnly parameter set to True?


Hi Steve,

Yes, I have tried True, False and Mixed and still the linked presentation
will not open simultaneously.

Strange thing though...

If I open the linked file first via the LaunchInKioskMode macro on Computer
A it works fine as we know.

While Computer A still has the linked file open, if I open PowerPoint
manually on Computer B and then try to open the same linked file I get a
dialog saying this:

'PowerPoint can't open the type of the file represented by...' then the file
path.

But the same linked file will open fine on Computer B after closing the file
on Computer A.

Any ideas?

Anyone?

Please?
 
K

kimkom

Steve Rindsberg said:
I think you may've picked up a rock with something wiggly and multi-legged
underneath it. Ick.

Any chance you can write this up and send me a couple of files that demo the
problem? I'd like to see if I can repro it here then send it along to someone at
MS.

If so, email to steve at-sign pptools dot com


Steve,

I have responded via email as you requested.

A thought occured to me while sending the email...
Maybe if I used the absolute file path in the Alt Text i.e S:\...file path
here.

Still didn't work :-(

Fingers crossed you can find the little wiggly multi-legged thing!

Regards,
Mike
 

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