MSH Library - Attachments is a VBA code library that provides procedure and function calls
to perform common tasks with MS Access Attachment fields, reducing the complexity of these tasks for the programmer.
This library provides VBA code to:
- Get a list of files in an Attachment field.
- Copy the contents of one Attachment field to another.
- Open an Attachment file – and clean up the temporary files!
- Add new documents/files to an Attachment field.
- Remove a file from an Attachment field, optionally saving/exporting the file before removal.
- Export a document/file from an Attachment field.
New features in v2017-05: A custom object –
clsAttachmentManager– which enables
a programmer to build a custom user-interface for records with attachment fields.
The Attachment Manager object provides these features:
- Replicates the majority of the behavior in Access' built-in interface for Attachment fields, without
the popup dialog.
- Works by detecting when the current record in a form changes and monitoring the contents of a
special temporary folder.
- Does not permit changing records until user has answered all prompts regarding opened
and/or modified attachments.
- Ensures the user is notified of attachments that have been modified and should be updated.
- Includes methods to add, open, remove, export, and update attachments.
- Contains a demonstration form with code to use the
MSH Library - Attachments v2017-05 has these additional features:
- Contains full documentation in PDF format
- Developed in MS Access VBA (Visual Basic for Applications)
- For MS Access 2007 (Service Pack 3) through MS Access 2016
- Modules, forms, and other database objects are unlocked and available for inspection and modification.
This is not public domain software. It is licensed to you at no cost.
MSH Library - Attachments v2017-05 and its documentation are released to you under one or
more of the GNU Public Licenses. Each pertinent GNU license is included in full as attachments in the
MSH Library - Attachments v2017-05.accdb. You may read the pertinent licenses in the
MSH Library - Attachments documentation
before downloading the source code.
You agree to be bound by these license agreements at such time as you utilize the VBA
source code, and/or distribute this or new versions of the code and/or its documentation.
Having trouble getting this application to work?
Use the Contact Me button to ask for help.
- Click the download link.
Your browser will display a file download dialog box.
MSH Library - Attachments v2017-05.zip to any location on your hard drive.
- When the download is complete, follow these steps:
- browse to where you saved
MSH Library - Attachments v2017-05.zip,
and right-click it.
- Choose "Extract All" from the right-click menu.
- Follow the prompts in the Extraction Wizard to extract the
MSH Library - Attachments v2017-05.accdb file to a location of your choice.
- Double-click the extracted
MSH Library - Attachments v2017-05.accdb file.
- Windows will launch MS Access and open the database application.
- Unless you have extracted the .accdb file to a "trusted" location
(as defined in your MS Access local configuration), you will see a security warning message under the MS Access
- Click the
Enable Content button (or the
Options button, depending on your
version of Office) to allow execution of the VBA code in the MS Access database.