save ppt file based on active excel file name

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.
 
I

intoit

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top