I would like Excel to write in the active folder of Outlook using VBA. But I am struggling to even define the path to the currently active folder.
Here is the code I'm trying to use:
Sub Test_folder_path()
Dim myFolder As Object
Set myFolder = Application.ActiveExplorer.CurrentFolder
End Sub
The error that I get is Error 438: ("Object Doesn’t Support this Property or Method")
If I try to define other types for myfolder
, Set myfolder
asks for an object.
I would be really happy about any advice, since I'm looking for a solution to this since hours!
I'm working with Office 2021.