Posted 4 August 2017, 2:38 pm ESTHi --
I'm a new AR user (I think my question makes that fairly obvious). I'm trying to list the reports I have available by iterating through a specified directory, loading the layout and reading out the .captions property. But it always returns empty. I've had some success with the .UserData, but a) that data sometimes disappears, and I haven't been able to figure out exactly which conditions cause that to happen and b) I'd like to use that property for something else.
I'd appreciate any help.
<font face="Courier New" size="2"> Dim RptsDir As String
RptsDir = pth & reports & "\"
Dim fs, fldr, fls, fl
Set fs = CreateObject("Scripting.FileSystemObject")
Set fldr = fs.GetFolder(RptsDir)
Set fls = fldr.Files
For Each fl In fls
Dim rptName As String
Dim AR As ActiveReport
Set AR = New ActiveReport
rptName = AR.Caption