I am trying to convert a script from IM3 to IM5.
In IM5 I get the error
10094 ActiveXAutomation: Object var is 'Nothing'
I show the parts of the code which should be of interest here:
The line producing the error is marked.
Dim catPoP As Category
Dim cur_img As File.
............
Set catPoP = db.Categories("TYPE of FOTO.PartofPano")
...........
For Each cur_img In imgs
AddCat (catPoP,cur_img)
Next
........
Function AddCat (cat As Category, img As File)
If Not cat.HasFile(img) Then '<<<<<<<<<<<<<<<< This line produces the error
cat.AssignFile img
End If
End Function
Any help is appreciated.
[attachment deleted by admin]