As part of a vbscript function I have the following for opening excel
and powerpoint documents:
elseif ucase(right(name,3)) = "XLS" or ucase(right(name,3)) = "XLT"
then
set exl = createobject("Excel.Application"
exl.visible = true
exl.Workbooks.add(name)
set exl = nothing
elseif ucase(right(name,3)) = "PPT" or ucase(right(name,3)) = "POT"
then
set pwrptApp = createobject("Powerpoint.Application"
pwrptApp.visible = true
'pwrptApp.Presentations.Open(name) 'Note: doesn't open templates as
new documents
pwrptApp.Presentations.add(name)
set pwrptApp = nothing
The problem I'm having is with the line
"pwrptApp.Presentations.add(name) " for opening powerpoint
presentations. If I use .add it only opens powerpoint with no document
loaded if I use .open it opens the presentation, but if it is a
template presentation (*.pot) it opens it as the template and not a
new presentation based on the template.
any help on this appreciated
thanks,
Robert
and powerpoint documents:
elseif ucase(right(name,3)) = "XLS" or ucase(right(name,3)) = "XLT"
then
set exl = createobject("Excel.Application"
exl.visible = true
exl.Workbooks.add(name)
set exl = nothing
elseif ucase(right(name,3)) = "PPT" or ucase(right(name,3)) = "POT"
then
set pwrptApp = createobject("Powerpoint.Application"
pwrptApp.visible = true
'pwrptApp.Presentations.Open(name) 'Note: doesn't open templates as
new documents
pwrptApp.Presentations.add(name)
set pwrptApp = nothing
The problem I'm having is with the line
"pwrptApp.Presentations.add(name) " for opening powerpoint
presentations. If I use .add it only opens powerpoint with no document
loaded if I use .open it opens the presentation, but if it is a
template presentation (*.pot) it opens it as the template and not a
new presentation based on the template.
any help on this appreciated
thanks,
Robert