acces & word

  • Thread starter Mainframe Sconvolto
  • Start date
M

Mainframe Sconvolto

I have to fill documents from tables in access.

Actually i have 3 choices:

1. Mailmerge in vb with the tables field

2. using a routine replacing all the parts i need using numbers like 1____
and 2_____ and so on
So i can do a for next replacing the index & "_" using find
(.MatchWildcards and so on)

3. using bookmarks and replacing them

What do you suggest me as best solution?
 
D

Doug Robbins - Word MVP

Mail merge will not require you to perform any coding. From the Tools menu
in Access, select Office Links and then Mailmerge with Word.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
M

Mainframe Sconvolto

Doug Robbins - Word MVP said:
Mail merge will not require you to perform any coding. From the Tools
menu in Access, select Office Links and then Mailmerge with Word.

--
I have ti open file A, or B, or C till G dependings on the type of
Department
so i use code to fill it
 
A

Albert D. Kallal

I have a nice working sample that does a merge of the current record to
word.

The sample I have can be found here:
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

What is nice/interesting about my sample is that is specially designed to
enable ANY form with ONE LINE of code....

Thus, each time you build a new form, you can word merge enable it with
great ease.

Make sure you read the instructions from above, and you should eventually
get to the following page
http://www.members.shaw.ca/AlbertKallal/wordmerge/page2.html


Note that the merge can also use a query, and thus you don't have to merge
just "one" record..

After the merge occurs, you get a plain document WITHOUT any merge fields,
and this allows the end user to save, edit, or even email the document
(since the merge fields are gone after the merge occurs).

Give the above a try.

I also don't use bookmarks, but use the standard merge fields. And, it like
notable that my access code actually creates a csv file, and then I set word
to use that csv file as a data source. I do this for increasing reliability,
and NEVER let word actually connect to the ms-access database (as that can
cause a lot of problems....one of which word tries to launch anohter copy of
access!).
 
D

Doug Robbins - Word MVP

In that case, I would use { DOCVARIABLE varname } fields in each of the
templates and have your code create a new document from the required
template and create variables in the document with the values from the
fields in the record and then update the { DOCVARIABLE } fields in that
document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top