Modify and Save Word File Stored in Table

Posted on 2013-11-19
Last Modified: 2013-11-19
Dear Experts,

My name is Lisa and I am new to Experts Exchange.

I am helping a friend develop the capability to open an attachment file from a document table (tbl_Document) and then edit and save it as a PDF and restore it in another table (tbl_Register) for government auditing and mailing purposes.

She is using office 2010 Home & Business and has Access 2010 installed.

I have taken the liberty of enclosing a sample db with the two tables which includes the sample Letter in docx format stored in the table called tbl_Document.

Any help or guide on this would be greatly appreciated.

Wishing well.
Question by:digigeek
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 21
ID: 39660643

I think most will agree ha the Best Practices is to NOT store the documents inside the table. You should only store the path to the file.

I have worked with many document management systems and create several.  I have yet to see a good one store the documents in the database.

I know of one situation where a Access database (.accdb) became corrupted and they lost all their documents because they were stored in the only in the database. They did not have a recent backup so they lost a lot of stuff.

If you must store them in the database I would urge you to upsize the back end to MS SQL Server 2012.

I would recommend purchasing a good document manageme3nt system. Once you have learned how the work, if you feel that you have outgrown them, then it may be time to re-create your own.

Here is an example of what you are trying to create:

ALso check ou the free version of Alfresco  ( ) They do have a free version.

Author Comment

ID: 39660753
Dear HiTechCoach,

Thanks for your informative reply.

All points noted.

With that said, moving towards your suggested solution of storing the documents outside the db in respective folders, is this easy to do?

I  don't want to incur any cost as I am doing this as a favour for a friend (and learning myself). I want to be sure that she can access the files directly from a form in Access, modify them, then save them to their respective external folder etc.

Is this an easier solution, if so, do you have any tips?

Wishing well,
LVL 21

Accepted Solution

Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 500 total points
ID: 39660831

There is not an easy solution for this. Especially when you need to deal with revision control,

This will require VBA coding. What is you VBA coding skill level?

I have created this example:

Document Links 2 (Click Here)
This is an update to the basic example of how to store the path to a file and also be able to view the file. You can browse using the standards windows common dialog to select the file. You can view the file using the application defined with the Windows File Associations. It uses the ShelExec API to open the file. It does not use the .Followhyperlink  method.

This example is a continuous form that could easily be used as a sub form to attach multiple documents to a record.

***** Because it doesn't use the hyperlink data type, this new version stores the path in a way that allows the folder to be easily moved.

I would still urge you to install the free version of Alfresco  ( ) so you can learn more about what you are attempting.

This also applies to programming:
WARNING: 5 Reasons why you should NEVER fix a computer for free.


Author Comment

ID: 39660966
Hi again,

Thanks so much for your help with this. It is very useful.

I think what you have provided in your sample db file will suffice for me to get started.

I used to program in VBA a lot but, I am rusty as hell and only worked with Office 2k and 2003.

I have also bought Access 2007 VBA Programmers reference on e-bay this morning to help me learn more as well as I am keen to get back into it. I am a stay at home mother and am wanting to get back into work.

I like your last link. It makes a lot of sense! Freebies are dangerous I agree. But, I have known this friend for a very long time and she has done a lot for me so I would like to return some of her favours in good faith.

Thanks again.

Wishing well.

Author Closing Comment

ID: 39660968
Great help from a very knowledgeable Expert. Thanks HiTechCoach!

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question