PDA

View Full Version : Access to Word Form Fill



defy
10-03-2011, 06:28 PM
Dear All,

I'm looking to program some sort of code, VBA, to export data from access 2010 to a word 2010 document which in it self represents a form. Here is the catch.

In access i have a specified name referring to the word document form. For example i have lots of forms A, B, C etc. SO i select form B it ones up form B, i then have to manually fill the form out, however access already contains all the necessary information. I.E System name, Number, Equipment Number etc.
So the question is, is there a way to export all the data from access to the word document pre specified into correct columns and rows in the word document?

I was thinking of using idetifiers such as: if line contains System ID: place space nad insert from System ID.

Could you at least point me in the right direction or provide a solution for me?

I know this is very poorly worded but my knowledge in access is very poor. Any help would be highly appreciated.

HiTechCoach
10-04-2011, 07:27 AM
The easiest way is to use a mail merge is possible. See: How to use automation to run Word mail merge from Access (http://www.hitechcoach.com/index.php?view=weblink&catid=84%3Aaccess-vba-office-automation&id=405%3Ahow-to-use-automation-to-run-word-mail-merge-from-access&option=com_weblinks&Itemid=23)


It is possible to use bookmarks. See: How to send the current record to Word with automation (http://www.hitechcoach.com/index.php?view=weblink&catid=84%3Aaccess-vba-office-automation&id=407%3Ahow-to-send-the-current-record-to-word-with-automation&option=com_weblinks&Itemid=23)



Note: Normally anything that works with Access 2000-2003 will work withAccess 2007/2010. For the most compatibility, example are usually posted in the oldest version possible. You can easily convert it to a newer version. That is why you see lots of post that are for Access 2000 or Access 2002/2003 and not as much for Access 2007 or 2010.

HiTechCoach
10-04-2011, 07:38 AM
Also this:

Fill in Word Forms Using Information Stored in Access (http://www.hitechcoach.com/index.php?view=weblink&catid=84%3Aaccess-vba-office-automation&id=409%3Afill-in-word-forms-using-information-stored-in-access&option=com_weblinks&Itemid=23)

nartlebzo
10-05-2011, 04:18 PM
Thanks thatwas very helpful

HiTechCoach
10-05-2011, 07:17 PM
You're welcome.

Good luck with your project.