save ppt file based on active excel file name

  • Thread starter Thread starter intoit
  • Start date Start date
I

intoit

Hi,

I've currently got a excel vba macro that activates a ppt file (a template,
basically) and then transfers a number of charts and cell values to various
slides within the template ppt file. Is it possible to then save the template
ppt file based on the name of the excel file (say, within the same folder as
the excel file)?

Thanks for any advice.
 
Thanks a lot, Steve Rindsberg. For anyone else who may be interested, this is
what the final macro looks like (well, for my purposes, anyway).

Dim sName As String
Dim PP As PowerPoint.Application

sName = ActiveWorkbook.Name
sName = Mid$(sName, 1, InStr(sName, ".") - 1)
sName = ActiveWorkbook.Path & "\" & sName & ".ppt"
PP.ActivePresentation.SaveAs Filename:=sName
MsgBox sName


End Sub
 
Back
Top