AnsweredAssumed Answered

How to delete an EPDM file using VBA

Question asked by Farzad Sidhva on Nov 7, 2018
Latest reply on Nov 8, 2018 by Farzad Sidhva

I am currently running into an issue where I have a very simple delete command. I Get a 438 error "Object doesn't support this property or method"


Any suggestions for how to resolve this error would help. I have successfully used similar commands in VBA but this particular function seems to be giving me issues.


Sub DeleteFile()

Dim eVault              As EdmVault5

Dim FolderPath          As String

Dim FilePath            As String

Dim eFile               As IEdmFile5

Dim eFolder             As IEdmFolder5


    Set eVault = New EdmVault5

    eVault.LoginAuto "_EngVault", 0


    FolderPath = "C:\_EngVault\USER_PROTOTYPE\FSIDHVA"

    FilePath = FolderPath & "\assy.SLDASM"


    Set eFolder = eVault.GetFolderFromPath(FolderPath)

    Set eFile = eVault.GetFileFromPath(FilePath, eFolder)


    eFolder.DeleteFile 0, eFile, True


End Sub