We have a Visual Basic 6 project that uses VBA to generate Powerpoint slides.
The program works fine with Office 2003 installed. But when we installed
Office 2007, the program gave us Error 70: Permission Denied.
gobjPP.ActiveWindow.ViewTy
pe = 6 ' ppViewOutline
gobjPP.ActivePresentation.
Slides.Ran
ge.Select
gobjPP.ActiveWindow.Select
ion.TextRa
nge.Charac
ters(Start
:=Len (gobjPP.ActiveWindow.Selec
tion.TextR
ange.Text)
, Length:=0).Select
gobjPP.ActiveWindow.Select
ion.TextRa
nge.Text = "Some Text"
In this example, a slide is created as layout ppLayoutBlank and the program switches to outline
mode. The program sets the title on the outline for the slide. This code works for Office 2003, but the last line gives the permissions error on the last line.
Has the object model changed so that this code is no longer valid?
Start Free Trial