I'll give it a try though using compacted (pseudo) LS , based on certain assumptions:
- All files can be stored to a common area on a server
- All documents are available within the same database
- Objects for finding the docs allocated (view and / or db)
- Document collection already allocated through view or DBSearch...
...
Set doc = doccoll.GetFirstDocument()
Dim FileName as String
Dim ServerFilePath as String
ServerFilePath$ = "\\ServerName\ServerShare\"
On Error Resume Next ' This one is a bit 'dangerous', should be a better error handler. Included mainly because of the 'ExtractFile' method
While (Not (doc is nothing)) then
if (Doc.HasEmbedded) then
ForAll fileobj In doc.EmbeddedObjects
FileName = fileobj.Source
if (instr(1, FileName, ".doc", 5) > 0) then 'Assume it IS a word document
Call fileobj.ExtractFile(ServerFilePath$ + FileName$)
end if
End ForAll
end if
Set doc = doccoll.GetNextDocument(doc)
Wend
...
Some minor adjustments must be expected but it should not be to far off the wanted result...
Brgds,
TrooDOS