Results 1 to 2 of 2
  1. #1
    gspiteri is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2014
    Posts
    1

    Saving an Open Word Document directly to an Attachment field in an Access 2010 table

    I am at the moment working on a database application for my own use. I have a word template used to compile Engineering technical reports with header data including title, date, reference number etc, followed by the main body. The header data is text information that can be easily stored and maintained in an access table and I am using some code to transfer this header data to my Word Template header which works fine, no problem there.



    The main body of the template report will include edited pictures showing various things like graphs, edited images and other technical information. The compilation of the main body of the report cannot be done in an access database and has to be done using MS.Word.

    Once the whole report is complete on the word application I would like to save the word template automatically, by clicking the save button for instance to an attachment field in a table called "CompleteReports" but unfortunately I cannot achieve this.

    I was thinking to approach the problem as follows:

    As soon as the Word Document containing the header information is generated this is saved automatically in the "Completereports" attachment field table. Then I would re-open this Word Document form the attachment table in order to continue with the work on the report so when I click save, the word document is saved in the attachment field directly.

    Any ideas and VBA code samples how to do this would be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    The file must be saved to a folder location, then the saved file can be embedded into Attachment field, then the saved file could be deleted. All can be done with code. Review https://www.accessforums.net/access/...eld-40827.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-11-2013, 07:21 AM
  2. Replies: 2
    Last Post: 03-19-2013, 02:40 PM
  3. Replies: 3
    Last Post: 02-22-2013, 06:41 AM
  4. Access database won't open directly
    By Rale in forum Access
    Replies: 0
    Last Post: 03-24-2011, 03:33 AM
  5. Open a word document from access
    By natalia in forum Programming
    Replies: 1
    Last Post: 10-13-2010, 08:04 AM

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