Why my macros are working in *.ptt, but not in *.pps ?

Z

Zbig

I'm working with XP Profesional, PowerPoint 2003
I'm new to PowerPoint/VB programming. Last 52 hours I've spent
on finding why my macros are working in *.ptt, but not in *.pps?????
As "*.ptt" every open MsgBox display correct information, but
As "*.pps" macro anotherPPS(FullPath As String) generates Error: ….The
PowerPoint Frame window does not exist
Please HELP!!!!! - Zbig

Dim BatonF As Integer
Dim pShow As Presentation
……………………………
Sub BatonFis3()

Dim Slid_NR As Long
If BatonF = 3 Then
Slid_NR = SlideShowWindows(1).View.Slide.SlideIndex
' MsgBox (Slid_NR)

If Slid_NR = 5 Then
Call anotherPPS ("c:\Show1.pps")

ElseIf Slid_NR = 9 Then
Call anotherPPS ("c:\Show2.pps")

End If
End If
End Sub
………………………….
Sub anotherPPS(FullPath As String)

On Error GoTo ErrHandle

' MsgBox (SlideShowWindows(1).Presentation.Name)
' MsgBox (FullPath)

Set pShow = Presentations.Open(FullPath, WithWindow:=msoTrue)

' MsgBox (pShow.Name)

Exit Sub

ErrHandle:
If Err.Number <> 0 Then
MsgBox Err.Number & " " & Err.Description, _
vbCritical + vbOKOnly, "Error"
End If
End Sub
 
S

Shyam Pillai

If you try to open a document window when the main PowerPoint UI is not
visible then you will get an error.
Add the following line:

Application.Visible = True
Set pShow = Presentations.Open(FullPath, WithWindow:=msoTrue)
 
D

David M. Marcovitz

I assume you mean *.ppt, not *.ptt. Usually, when an error occurs in a
PPS file and not a PPT file, it is because your computer is choosing a
different application (such as the Viewer or an older version of
PowerPoint) to run .pps files. Another possibility is that your VBA
doesn't work in Slide Show View and only works in Normal View (.pps
generally only runs in Slide Show View).
--David

David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/

(e-mail address removed) (Zbig) wrote in @posting.google.com:
 
Z

Zbig

Dear David, Thank you for your answer and for your great Site (I was
there many times). Of course *.ppt ! Unfortunately your tip is not
helping me…. I'm working with a brand new DELL Inspiron/9100 (3 weeks
old) and PowerPoint 2003/MVB 6.3 as a part of Office Small Business
Edition 2003 (DELL package). I'm assuming this should work
together!
Any other idea?
Maybe should I create a Collection of Presentations on higher level
than a Module? But I don't know how – I couldn't find any sample of
such a code. Could you help me?
Zbig (www.zbigvision.com)
 
Z

Zbig

Dear Shyam, thank you for your answer and for many tips at your great
Site. Inserting "Application.Visible = True" I have tried before.
It's removing Error, opening another *.pps but when I'm exiting it –
instead to return to the original Application it's opening my VB
editor. It's happening in pps mode (after saving the whole show as
pps) – when I'm in ppt mode (in VB editor) – everything is OK. Please
look on my posting to David M. Marcovitz. Thank you, Zbig
(www.zbigvision.com)
 
D

David M. Marcovitz

Thanks. I'm glad you enjoyed my site. I think Shyam will be better at
debugging your code. I'll bet he'll have an answer for you soon, but I'm
still confused as to why it would work in a PPT file and not in a PPS
file. Does it work in your PPT file when you switch to Slide Show View?
As far as I know a PPS file is identical to a PPT file; it is just that
the PPS file starts in Slide Show View when you double-click it.
--David

David M. Marcovitz, Ph.D.
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.loyola.edu/education/PowerfulPowerPoint/

(e-mail address removed) (Zbig) wrote in
 
Z

Zbig

Dear Shyam, thank you for your answer and for many tips at your great
Site. Inserting "Application.Visible = True" I have tried before.
It's removing Error, starting a New.pps but when I'm exiting it –
instead to return to the Start application - it's opening my VB
editor - HOW TO AVOID THAT?!
This is happening in the "pps" mode - after saving the whole show
(Start.ppt which includes opening of Start.pps) as a .pps file.
When I'm in the "ppt" mode (in the VB editor) – everything is OK.

I'm developing a PowerPoint Presentation using only MouseOver actions.
To avoid not desired activation caused by a coincidental mouse
movement I'm trying to build a logic to mouse action (user has to roll
over several invisible shapes).

In short:
I need a macro or method for conditional linking between several
Presentations. After reading many postings about similar issues I can
not find anything what is solving my problem.


Please look on my posting to David M. Marcovitz. Thank you, Zbig
(www.zbigvision.com)
 
Z

Zbig

Dear Shyam, thank you for working on my case…
I would like to lunch my completed Presentation from an icon placed on
the Desktop. So I'm assuming it should be a slideshow mode (I would
like to avoid any views of PowerPoint/VB editors). It's going to be a
big InfoCom show in Atlanta, starting in a few days…. I desperately
need a hand! I appreciate your help, thanks - Zbig
 

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