I have two sheets ("000-macros for report.pptm" and "slides 07-25-23.pptx")
my goal is to
- start on slides sheet
- save slides sheet name as startfilename (variable)
- switch to macro sheet
- save macro sheet name as macrodocument (variable)
- switch back to codes sheet
- this codes sheet name can be different name each time. that is why I saved it as startfilename
I tried to just include relevant code
Dim StartPres As Presentation
Dim macrodocument As String
Dim StartFileName As String
Set StartPres = ActivePresentation
StartFileName = ActivePresentation.Name 'startfilename is now set to "slides 07-25-23.pptx"
Presentations("000-macros for report").Windows(1).Activate
macrodocument = sld.Shapes("Macro Doc Value").TextFrame.TextRange.Text ' macrodocument is not set to "000-macros for report.pptm"
Presentations(StartFileName).Windows(1).Activate 'this is where the issue is