How to Print 1 record or a lot to Word Docx (1 Viewer)

rickadams

Registered User.
Local time
Today, 18:53
Joined
Mar 11, 2018
Messages
10
I have been given the task of exporting and printing (1 up to 800) records to a word docx for a Door entry system.

Basically it prints instructions on how to use the system and includes a directory entry code and an access card number for the tenant. I also will need to print labels for the the cards to give each tenant.
Samples of Users.mdb and Word document Attached:

All of the information in the database is stored in Access 2000 format. It is a purchased program that can't be changed.

I am totally lost on how to do this and really need help.
I need a print button for 1 selected record when a tenant has lost a card (or all the cards for the group), and a print button for some or all the letters for an entire group.

Thank you in advance
 

Attachments

  • Mergefieldsforletter.docx
    18.6 KB · Views: 85
  • Users.mdb
    260 KB · Views: 80

isladogs

MVP / VIP
Local time
Today, 22:53
Joined
Jan 14, 2017
Messages
18,186
You say it can't be altered yet you have access to the tables and you want advice on altering it with print buttons for mail merge....

In what way can't it be altered?

Does it have any mail merge code now? If not consider 'super easy mail merge' by albert kallal.

I would also update to an ACCDB file if possible.
 

Gasman

Enthusiastic Amateur
Local time
Today, 22:53
Joined
Sep 21, 2011
Messages
14,048
Do it the other way.?
From Word, select the records you want to be printed.
 

rickadams

Registered User.
Local time
Today, 18:53
Joined
Mar 11, 2018
Messages
10
You say it can't be altered yet you have access to the tables and you want advice on altering it with print buttons for mail merge....

In what way can't it be altered?

Does it have any mail merge code now? If not consider 'super easy mail merge' by albert kallal.

I would also update to an ACCDB file if possible.

Thank you for responding!

The database does not have any mail merge capabilities built in, and they need to stay in 2000 version because the Acessbase2000.exe program by nortekcontrol.com/support/software-downloads which communicates with the door controllers will not allow me to update to the .mdb files to the newer versions ACCDB.

We have 9 buildings on these systems and tenants change all the time.

I have been able to export and fill my forms myself by symbolic linking the cards.mdb, codes.mdb, entrynumbers.mdb, etc with Users.mdb. I am looking for a way to do this quickly without loading, exporting to excel then merging with word. I can make it work that way, however I want to have someone else at the office to be able to simply print a label and give a tenant an instruction sheet from access without getting involved and doing this every time a there is a tenant change or a current tenant lost their card... I attached a screenshot of a form I created with print button however it does not do anything.:banghead:

I hope I am making sense.
 

Attachments

  • printformab2000.jpg
    printformab2000.jpg
    86.7 KB · Views: 82

Gasman

Enthusiastic Amateur
Local time
Today, 22:53
Joined
Sep 21, 2011
Messages
14,048
I am looking for a way to do this quickly without loading, exporting to excel then merging with word.

You don't export to Excel, just use Access as the source for the mailmerge.
You might need to create a query to put all the required data into a record, ready for the mailmerge.
 

rickadams

Registered User.
Local time
Today, 18:53
Joined
Mar 11, 2018
Messages
10
You don't export to Excel, just use Access as the source for the mailmerge.
You might need to create a query to put all the required data into a record, ready for the mailmerge.

Thank you for responding, I am not trying to sound ungratful.

The only way I can get this database to export all the information I need to merge in word is via Excel after running a report then exporting that report to excel.

I cannot get it to work with a query, I have tried every way I can think of and simply said some of the required data does not transfer to word. Most of the data required is blank and quite a few of the records just do not transfer. It seems nothing from one of the symbolically linked database fills in the info. And I do not know why. Yet as stated above if I create a report they export to excel perfectly ok and the mail merge in word does what I need.


This is why I was looking for help to create run via VBA with a button a user can click to print either 1 or all of the data to the forms. There has got to be an easy way.
 

isladogs

MVP / VIP
Local time
Today, 22:53
Joined
Jan 14, 2017
Messages
18,186
Sorry to repeat but it really should not be necessary to use Excel as an intermediary step.

Strongly recommend you download albert kallal's mail merge code.
Don't be put off by his 'primitive' web page.
The code is extremely good and easy to use.
 

rickadams

Registered User.
Local time
Today, 18:53
Joined
Mar 11, 2018
Messages
10
I have been trying to do this merge from Access to Word since 2014, that right 2014.

I do not know how to get albert kallal's mail merge code to work on the database's I have. There are 9 of them all in different folders. I have been experimenting on test DB's that were copied from real ones so I don't mess anything up. To be honest if I can't do it, I certainly cannot expect my associates to know how to do this. They look at me in amazement when I make it work the way I figured out before which takes hours per DB. That is why I have been asking for help.:banghead: I do appreciate the suggestions I have received before.
 

MarkK

bit cruncher
Local time
Today, 15:53
Joined
Mar 17, 2004
Messages
8,178
It sounds to me like you are an agent in a for-profit business, and you need a tool. I think if you had a leaky pipe you would hire a plumber. I think if the grass got long, you would buy a lawn-mower, or hire a gardening company. For the problem you are posting about, and for the amount of work you have shown us that you have done on it, I think you should hire an Access programmer. Get the job done right, and write it off an an operating expense.
Spend the money, support our trade, and solve the problem properly. Thanks for you consideration,
Mark
 

rickadams

Registered User.
Local time
Today, 18:53
Joined
Mar 11, 2018
Messages
10
Mark, thank you for the reply... Unfortunately I am the 60 year old plumber, the electrician, landscaper, roofer, locksmith, volunteer firefighter and paramedic... Etc. Based on your response there probably is a "Paid" solution to my situation however it seems that no one wants to lend a helping hand. Thank you anyway.
 

isladogs

MVP / VIP
Local time
Today, 22:53
Joined
Jan 14, 2017
Messages
18,186
Mark, thank you for the reply... Unfortunately I am the 60 year old plumber, the electrician, landscaper, roofer, locksmith, volunteer firefighter and paramedic... Etc. Based on your response there probably is a "Paid" solution to my situation however it seems that no one wants to lend a helping hand. Thank you anyway.

I sympathise BUT ...
Actually, several of us have tried to offer suggestions.
There is no real point anyone offering to write code for you when there are high quality, free solutions available
 

rickadams

Registered User.
Local time
Today, 18:53
Joined
Mar 11, 2018
Messages
10
So how does one find a programmer? And what is the approximate cost for the question I asked? (A little side humor here: Since Microsoft changed the names of programs to apps in Windows 10, do I now ask for an Apper?)
 

moke123

AWF VIP
Local time
Today, 18:53
Joined
Jan 11, 2013
Messages
3,852
The only way I can get this database to export all the information I need to merge in word is via Excel after running a report then exporting that report to excel.

I use albert's code all the time. I have one app that requires nearly 100 merge fields. I found that the simplest way to gather all that information, since it is far from being normalized, was to use a temp table and use a series of insert and update queries to populate that table. Then with Alberts code I simply use "Select * from MyTempTable"

heres alberts code with your 2 tables in it.

Btw, if you can get all the data into a report, i assume you can get it into a form, and thats all you need for alberts code.
 

Attachments

  • WordMerge2008.mdb
    608 KB · Views: 68

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:53
Joined
Feb 19, 2002
Messages
42,976
Can you create a new, empty database and link to the tables of the custom app? If you can, then you can modify Albert's tool. I'm also posting a tool that I made. Mine uses bookmarks because I have found my users to be slightly more intelligent than Albert's. In this sample, the merge fields are all hardcoded. In the real application, they are not. The real application supports THOUSANDS of documents. The whole process is tablized. The application offers a couple hundred fields (these are all related to insurance policy documents) and there is a mapping table that maps the bookmarks in a document to fields that the app has made available. There is also a fixed set of tables that can be inserted into a document. The example is in two zip files because a single file would be too large to upload.

Of course, if you can't link to the BE tables, then you're pretty much SOL unless the vendor can provide access for you. Is the BE Jet or is it SQL Server? Do you know?
 

Attachments

  • SampleLetters.zip
    446.9 KB · Views: 79
  • SampleWordAutomation180206accdbNoDocs.zip
    413.3 KB · Views: 84

Users who are viewing this thread

Top Bottom