Save opened excel file in dynamic path using script

I have a scenario where after downloading the file from the desktop application it opened automatically and is not saved in the downloads folder so how can I save that opened Excel file in a dynamic location using vb script or any other method

@saransh_garg

  • Use the Attach Window activity to attach to the opened Excel instance.
  • Indicate the opened Excel window
  • Use the Invoke VBA activity to run the VBA code to save the file.
Sub SaveAsDynamicLocation()
    Dim filePath As String
    filePath = "C:\YourDynamicPath\YourFileName.xlsx"
    ActiveWorkbook.SaveAs filePath
End Sub

Please try this hope it will work for you

I would just find out where that app is saving files. It has to be saved somewhere. Download one manually and when it opens go to File, Info…and it’ll tell you where it’s saved.

It is saved in temp folder

So use Wait For Download, and then Move File to move it to where you want it.