I am alredy logged into the pdm and using the standard api calls to open explorer.
Any help? what method should I use to open (and close) an explorer window pointing a vault path?
UPDATE
I was trying it from excel VBA using
Code: Select all
ThisWorkbook.FollowHyperlink strDirectory, "", False, False
Code: Select all
Dim vault As EdmVault5
Set vault = New EdmVault5
vault.LoginAuto "VAULTNAMEHERE", 0
Dim location As String
Shell "C:\WINDOWS\explorer.exe """ & vault.RootFolderPath & "", vbNormalFocus
search every explorer window and close the one inside the vault.
With the code below that would not be a problem and it works for paths like c:\ or c:\windows
Code: Select all
Sub CloseExplorerWindowByPath(targetFolderPath As String)
Dim explorerWindow As Object
Dim shellWindows As Object
Set explorerWindow = CreateObject("Shell.Application").Windows
' Loop through each Explorer window
For Each explorerWindow In shellWindows
' Check if the window's document folder path matches the target path
If InStr(1, explorerWindow.Document.Folder.Self.Path, targetFolderPath, vbTextCompare) > 0 Then
' Close the matching window
explorerWindow.Quit
Exit For
End If
Next explorerWindow
End Sub
The path supplyed is valid but the object does not support the path property apparently.
Testing on Win11 and Excel 2016 64 bit.