Solved

How to sync with word documents from Access database

Posted on 2011-02-11
6
405 Views
Last Modified: 2012-05-11

Hello, I have an associate that would like to populate an Access database (with data and also with backend forms/controls/VB, reports) and either create (from scratch) or populate (using templates of some sort?) microsoft word documents (not Access reports, actual word docs) that contain slices of the data.

I undertook a similar task several years ago, accessed the Word API from VB to generate word documents in memory and then save them to disk.  This was very slow, and the wrong choice.  I'm sure there have been evolutions in interoperability since then, I'm just out of touch.

Anyway, since I chose wrong previously and didn't know till the end, thought I'd ask first: can anyone recommend an approach to this?  

(We are in the middle of migrating, but I think we want to assume the Office 2007 suite.)

Thanks very much in advance.
0
Comment
Question by:riceman0
[X]
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
6 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 125 total points
ID: 34874061

  Attached is a sample Access DB that from the Access side, inserts data into a Word Template at bookmarked locations.  Is along the lines of what your looking for and should work in A2007 without any real changes.

JimD.
mmA2002.zip
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 34874152
Firstly, such techniques are probably not version-dependent.

The principle (no-code) method to populate word documents from Access is to use Mail Merge. If you are using this function, then it will still work with the upgrade.

Otherwise, I think that we need more information.
0
 
LVL 31

Assisted Solution

by:Helen_Feddema
Helen_Feddema earned 125 total points
ID: 34874287
See my old code sample #24 (Four Ways to Merge to Word):

http://www.helenfeddema.com/Files/code24.zip

Or my more recent ebook, Working with Word, available from Office Watch, for techniques useful in Word 2007 and up.  There are many ways to fill Word docs with data from Access -- Bookmarks, Doc Properties, Doc Variables, TypeText and MailMerge.  MailMerge generally requires an active link to the database, which can be problematic, though you can avoid this by exporting the data to a text file and linking the Word merge doc to that file.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 125 total points
ID: 34874342
I like to use this: Super Easy Word Merge

I find it much more user friendly and easier to use than bookmarks for most users..
0
 
LVL 76

Assisted Solution

by:GrahamSkan
GrahamSkan earned 125 total points
ID: 34877981
I think I misread the question. You will need some code to populate Access from Word.

The difficulty is in finding the data that is need from the document.

If you are starting from scratch, then it would be best to use forms documents. This requires controls to receive the data from the user. For compatibility with 2003 and earlier, you would need Forms controls. Otherwise Content controls are available.

Second best is to use tables to define the data to be read.

If the documents already exist, you may need some complex parsing.

If you host the application in Word, you can use ADO, so that there is no need to open an Access application. To  drive from Access you will have to create or open an instance of Word and then open the relevant document(s).
0
 

Author Closing Comment

by:riceman0
ID: 34879293
Thanks for the pointers all.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

730 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