I have a very simple agent which loops through all documents in a database and extracts all attached files to the file system. However, for some reason it always fails on attachments of type .htm with an error:
“Object variable Not Set”
Debugging the code looks fine and as I say it extracts everything else other than “.htm”.
Anyone seen this or got any thoughts?
Code shown below.
attachlist = Evaluate(“@AttachmentNames”, doc)
attachnum = Evaluate(“@Attachments”, doc)
count = Cint(attachnum(0))
Redim vfiles(count) As String
cnt = 0
If (count > 0) Then
Forall v In attachlist
filenamee = v
Set inputAttachment = doc.GetAttachment ( fileNamee )
filePath = "C:\Temp\" & fileNamee
Call inputAttachment.ExtractFile ( filePath )
End Forall
End If