sirbudan82
New Member
- Joined
- Feb 3, 2016
- Messages
- 16
I'm using a simple VBA code to open a PowerPoint file from an Excel file.
Sub PPT()
Dim myPresentation As Object
Dim PowerPointApp As Object
Set myPresentation = CreateObject("Powerpoint.application")
myPresentation.presentations.Open "C:\Folder\Subfolder\F11_Blank.pptx"
myPresentation.Visible = True
myPresentation.SaveAs "C:\Folder\Subfolder\F11_Updated.pptx"
End Sub
For the moment I need to update the path of the file every time the folder name changes, I was wondering if there is a way to reference the path file to an Excel cell value and avoid opening the visual basic editor. Another option would be to browse the folder when opening and then to select the path when saving.
Any help would be really appreciated, many thanks.
Sub PPT()
Dim myPresentation As Object
Dim PowerPointApp As Object
Set myPresentation = CreateObject("Powerpoint.application")
myPresentation.presentations.Open "C:\Folder\Subfolder\F11_Blank.pptx"
myPresentation.Visible = True
myPresentation.SaveAs "C:\Folder\Subfolder\F11_Updated.pptx"
End Sub
For the moment I need to update the path of the file every time the folder name changes, I was wondering if there is a way to reference the path file to an Excel cell value and avoid opening the visual basic editor. Another option would be to browse the folder when opening and then to select the path when saving.
Any help would be really appreciated, many thanks.