Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to sync with word documents from Access database

Posted on 2011-02-11
6
Medium Priority
?
411 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 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 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 500 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 21

Assisted Solution

by:Boyd (HiTechCoach) Trimmell, Microsoft Access MVP
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 500 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 500 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

618 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