Une partie des codes (pas eu le temps de compiler tout en un seul donc faudra adapter)
Renommage:
Dim sRename As String
Dim vault As EdmVault5
Dim folder As IEdmFolder6
Dim file As IEdmFile6
Dim sPathName As String
Dim sNewName As String
Dim sActualName As String
Sub main()
Set vault = New EdmVault5
vault.LoginAuto "xxx", 0
I = 7
Do While Cells(I, 1) <> ""
sReference = Cells(I, 1).Value
sFolder = Cells(I, 5).Value
sRename = Cells(I, 12).Value
Set folder = vault.GetFolderFromPath(sFolder)
Set file = folder.GetFile(sReference)
file.Rename 0, sRename, True
I = I + 1
Loop
DoEvents
I = 0
End Sub
Déplacer un fichier:
Sub MoveFile()
Set vault = New EdmVault5
vault.LoginAuto "xxx", 0
I = 7
Do While Cells(I, 1) <> ""
Reference = Cells(I, 1).value
Source = Cells(I, 11).value
Destination = Cells(I, 5).value
Set Folder = vault.GetFolderFromPath(Source)
Set file = Folder.GetFile(Reference)
Set dest = vault.GetFolderFromPath(Destination)
file.Move 0, Folder.ID, dest.ID, 0
I = I + 1
Loop
End Sub
Mise à jour des varaibles de carte:
Sub UpdateTDM()
Set vault = New EdmVault5
vault.LoginAuto "xxx", 0
i = 2
Do While Cells(i, 11) <> ""
Set folder = vault.GetFolderFromPath(Cells(i, 5))
Set file = vault.GetFileFromPath(Cells(i, 5) & "\" & Cells(i, 1))
file.LockFile folder.ID, 0
Set pEnumVar = file.GetEnumeratorVariable
pEnumVar.SetVar "xxx", "", Cells(i, 12) 'Mettre le nom de la variable
pEnumVar.SetVar "xxx", "", Cells(i, 13) 'Mettre le nom de la variable
pEnumVar.SetVar "xxx", "", Cells(i, 11) 'Mettre le nom de la variable
pEnumVar.CloseFile (True)
file.UnlockFile folder.ID, "Ajout réf, désignation et indice" 'Si archivage dans la foulée se servir de cette ligne sinon supprimer
Cells(i, 14).value = "Traité"
i = i + 1
Loop
End Sub
Je peux être en support si besoin mais pas totalement dispo.