How to save file from attachment field to external folder (1 Viewer)

behnam

Registered User.
Local time
Today, 01:27
Joined
Jun 3, 2014
Messages
13
Hi, i have a table with an attachment field called email, where a .msg file is stored for each record. Can someone help me with the code to save this contents of this field in a folder in my drive, thanks.
 

vbaInet

AWF VIP
Local time
Today, 08:27
Joined
Jan 22, 2010
Messages
26,374
For the Attachment field you need Recordset2. This special recordset contains the properties you'll use to save the file to disk (SaveToFile method of a field). So you'll need to loop through the first recordset of the table and for each record use the Recordset2 to save to disk. An attachment field is a recordset of its own hence Recordset2.

As for writing the code for you, you first need to do some research and show us what you come up with.
 

Users who are viewing this thread

Top Bottom