Getting db.containers from an external database

A

Alp

Hi Experts,

Yet another question:
Thanks to Arvin Meter, I have the vba code to document (as text) the
dn.containers(??) when run within the database itself. I'd like to run it on
an external mdb/mde. The following partial code actually does create the
folder itself but not the documents as it would if run in the same db.

Any guidance will be highly appreciated.

Alp

Code.....
Set dbs = OpenDatabase(Forms!fr_ShowDBdetails!filename) '21/04/2004
CurrentDb() ' use CurrentDb() to refresh Collections

Set cnt = dbs.Containers("Forms")
Set fs = CreateObject("Scripting.FileSystemObject")
yer = pth & "Document\Forms\"
Set a = fs.CreateFolder(yer)
For Each doc In cnt.Documents
Application.SaveAsText acForm, doc.Name, lokasyon & "\Document\Forms\" &
doc.Name & ".txt"
Next doc
.......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top