Thank you,
Dave
I am using VBScript (Yes I know, but it is FREE and comes with Windows XP)
here is my code (try.vbs saved in C:\tmp):
Const msoTrue = -1
Const msoFalse = 0
Const ppViewNormal = 9
Const ppLayoutText = 2
Dim ppApp
Dim ppPres
Dim ppActWin
Dim ppCurSlide
Dim objShapeOLE
Set ppApp = CreateObject("Powerpoint.Application")
ppApp.Visible = msoTrue
' The following template has master slides (only)
Set ppPres = ppApp.Presentations.Open(C:\tmp\template_presentation.ppt",
msoFalse)
Set ppActWin = ppApp.ActiveWindow
ppActWin.ViewType = ppViewNormal
Set ppCurSlide = ppPres.Slides.Add(ppPres.Slides.Count + 1, ppLayoutText)
ppCurSlide.Layout = ppLayoutText
ppCurSlide.Select
' Delete the body text box
ppCurSlide.Shapes(2).Delete
' Fails with "Unspecified error"
Set objShapeOLE = ppCurSlide.Shapes.AddOLEObject(30, 78, 660, 440,
"C:\tmp\worddoc.doc")