Results 1 to 2 of 2
  1. #1
    HDobler is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2013
    Posts
    7

    Automating Copying of .TXT Files into Memo fields in Access

    I have a database that contains information about documents. Each document has a unique ID and there is a single record for each document in the database.



    I have a hyperlink field that links to each actual document (either a Word file or a PDF file).

    I need the ability to search the contents of those documents within Access. The only option I have come up with is to temporarily create .TXT files from the word/pdf files and then copy the contents of each .TXT file into the Memo field of the corresponding record. Repeat this many times to populate the entire database.

    I am looking for some type of automated way to open each .TXT file and copy the contents of that into the memo field, delete the temporary .TXT file, move on to the next record and continue with the next file.

    Please offer any suggestion possible.

    If there is a way of automating within Access the process of just getting the text directly from the Word or PDF file and copying that, even better if I can eliminate the middle step of creating a tempory file that will only get deleted when finished.

    The file names all start with the document ID followed by some other characters.

    Thank you in advance for any assistance or suggestions possible.

  2. #2
    Dal Jeanis is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2013
    Location
    Dallas TX
    Posts
    1,742
    Okay, I'm not sure that I get this. You have a large number of documents, and you want to search the text in those documents, from within Access?

    For the .doc files, there is definitely a way to use Access to get the words from the file. Unfortunately, the exact details are dependent on what version of word files you are dealing with (doc or docx). Hmm. All the examples I found out there are pushing stuff TO MS Word, not pulling stuff FROM MS Word. Okay, this one is close - http://www.databasedev.co.uk/open_word_doc.html.

    For PDFs, Adobe appears to have automation as well. Start here http://www.planetpdf.com/forumarchive/117079.asp.

    I would suggest that you keep the text in a separate table, not the same one. I would also suggest that, in that table, you keep the date/time the .Doc or PDF was last updated, and only open the doc or PDF file and refresh the data in the table if the file has been modified since then. Otherwise, setting up to search will take a long long long time.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Automating the prcoess of Importing data from 365 XLSM files
    By Ammar Iftikhar in forum Import/Export Data
    Replies: 0
    Last Post: 02-08-2013, 12:04 PM
  2. Replies: 2
    Last Post: 01-08-2013, 08:20 AM
  3. Replies: 5
    Last Post: 01-30-2012, 01:14 PM
  4. Copying and Rename of Files based on fields
    By desk4tbc in forum Programming
    Replies: 2
    Last Post: 06-28-2011, 11:00 AM
  5. Copying multiple files?
    By daveofgv in forum Programming
    Replies: 3
    Last Post: 04-14-2011, 03:18 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums