Re: opening pps in editmode



Hi Shyam,

I am trying to combine the 2 scripts to form one that opens a pps in edit
mode as well as enters tht epassword but there seems to be a problem I can't
find.
I usually write in php and Lingo, and a bit in ActionScript so VB is
completely new to me...
Here is the script:
*********************************************
Option Explicit
Declare Function SetTimer Lib "user32" _
(ByVal hwnd As Long, _
ByVal nIDEvent As Long, _
ByVal uElapse As Long, _
ByVal lpTimerFunc As Long) As Long
Declare Function KillTimer Lib "user32" _
(ByVal hwnd As Long, _
ByVal nIDEvent As Long) As Long
Public TimerID As Long
Public sPwd As String




Sub OpenPassPres()

On Error GoTo ErrHandle

Dim pShow As Presentation

TimerID = SetTimer(0, 0, 2000, AddressOf PassProc)

' Lock the window to prevent refreshing
ScreenUpdating = False

' your password
sPwd = "marple"

'Open the show, however use additional flag - WithWindow set to FALSE
Set pShow =
Presentations.Open("C:\WorkFolder\TrainingModuleSystem\Xtras_stuff\ActiveCompanion_Xtra\PPA_Test\OurApproachPowerPoint.pps", WithWindow:=msoFalse)

'Open a window now to the presentation for editing
pShow.NewWindow

' Unlock the window to start refreshing again
ScreenUpdating = True
Exit Sub


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





Sub PassProc(ByVal hwnd As Long, _
ByVal uMsg As Long, _
ByVal idEvent As Long, _
ByVal dwTime As Long)
TimerID = KillTimer(0, TimerID)
SendKeys sPwd & "~"
End Sub
******************************************

Is it a problem easily spotted?

Thx if you can help me!!!!

NC

"Shyam Pillai" wrote:

> Nik,
> How to open a PowerPoint Show (*.pps) programatically.
> http://skp.mvps.org/ppt00033.htm#VBAPPSOpen
>
>
> --
> Regards,
> Shyam Pillai
>
> Handout Wizard: http://skp.mvps.org/how
>
>
> "Nik C" <NikC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:9198E263-3F97-4FD2-9C0A-FAF9F2D3F930@xxxxxxxxxxxxxxxx
> > Hi,
> >
> > How can I open a .pps in edit mode (as if it were a .ppt) with VB?
> > Is this possible at all?
> > Thx
> > NC
> > --
> > Nik C
> > multimedia developer
> > JohnsonDiversey
>
>
>
.



Relevant Pages

  • Re: Trying to get info and control a "child" web page
    ... Sub getgoogle() ... window with a URL matching some kind of pattern. ... Dim objShell As Object, objShellWindows As Object, o As Object ... Which opens up a page, this page I can programically navigate and open another page ...
    (microsoft.public.excel.programming)
  • window.showModalDialog() works perfect, but returning to parent-page doesnot
    ... First I tried using two aspx pages with standard controls and all those ... it opens a new internet explorer instance ... showing the same controls as the modal dialog window. ... Sub Button2_onclick ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Trying to get info and control a "child" web page
    ... You can use this to get a reference to the child window. ... Dim objShell As Object, objShellWindows As Object, o As Object ... Sub DoBrowse1 ... Which opens up a page, this page I can programically navigate and open another page ...
    (microsoft.public.excel.programming)
  • Re: Opening multiple files at once, interface and flicker issues
    ... The first is to have opening scripts which should be triggered if the user navigates to them using the Window>> Show Window menu option. ... The second is to use FileMaker Advanced to actually remove the Window menu option thus preventing the user from opening those files. ... opens another file, the password is "inherited" and the second file's ...
    (comp.databases.filemaker)
  • Re: GanttBarFormat questions
    ... > Sub TestGanttFormat() ... > The dialog window opens because you supplied an invalid argument. ... >> Dim myTask As Task ...
    (microsoft.public.project.vba)