PDA

View Full Version : [SOLVED:] Opening PPT file from a server



Ayla1427
11-15-2023, 04:15 AM
I am a newbie to vba however I have created the following to open a ppt template saved on a server


Sub OpenPPTFromServer() ' Replace "\\Server\Path\to\Your\File.pptx" with the actual server path
Dim serverFilePath As String
serverFilePath = "\\Server\Path\to\Your\File.pptx"
' Open the file
Presentations.Open serverFilePath
End Sub

which works, however it opens the .potx rather than opening a new file from template, can someone please help with what to add to this?

thanks in advance

Ayla1427
11-15-2023, 04:59 AM
Solved with this code;

Presentations.Open FileName:=“FILEPATH”, Untitled:=msotrue