Automatización con PowerPoint III
Visual Fox Pro, Trucos Comentarios ( 0 ) »Use Home(2)+ "dataemployee" Alias Emp
Shared
cCrLf = Chr(13) + Chr(10)&& Salto de línea
oPPT = CreateObject("PowerPoint.Application")
oPPT.Visible
= .T.
cTmpl="c:Archivos de programaMicrosoft Office"+;
"TemplatesPresentation DesignsGlobe.pot"
oPres = oPPT.Presentations.Add
oPres.ApplyTemplate(cTmpl)
Select Emp
Scan
oSlide = oPres.Slides.Add(1,2)
oShapes = oSlide.Shapes
oTitulo = oShapes.Item("Rectangle 2")
oTitulo.TextFrame.TextRange.Text= Trim(Last_Name) + " " + Trim(First_Name)
cStr = "Cargo: "+
Trim(Title) + cCrLf
cStr = cStr + "País: " + Trim(Country) + cCrLf
cStr = cStr + "Ciudad: " + Trim(City) + cCrLf
oTitulo = oShapes.Item("Rectangle
3")
oTitulo.TextFrame.TextRange.Text= cStr
EndScan
Use in Emp
oPres.SaveAs("C:MiPresentacion.ppt")
oPres.Close
oPPT.Quit
Por: David Amador T