Using Word 2003 to fill in a form from Access 2003

G

Guest

Hi,

I have a database written in Access (v2003). I want to be able to print off
some renewal letters using the data in Access.

I have a template set up in Word (v2003) - I know I can do this from Word
and pull off data from Access, but I would prefer to use Access, find the
relevant record, and then print off the letter using my Word template - I can
maintain the formatting of the document and make minor adjustments this way.

Does anyone have any suggestions on how to approach this - not using Word
Mail Merge.
 
G

Guest

Hi Marek

This is straight forward:

- create Bookmarks in your Word document correspnding to the Access data you
want to insert.
- from within Access, open Word as an object and load the template.
- pull in your data and insert into the template's bookmarks.

Let me know if you want specific coding to do any of the above.

Cheers.

BW
 
G

Guest

Thanks for the speedy response.

Not sure what I am supposed to do here - could you break it down for me.
 
G

Guest

Be pleased to !

Before doing so can you let me know what your knowledge of VBA is? e.g. can
you use VBA to extract data from your tables etc.?

Let me know and I'll know where to start.

heers.

BW
 
G

Guest

Hi - thanks.

Have solved it now. Set up a Word Mail Merge document and created the VBA
code in my Access DB to merge only the current record - works a treat!!

Oh, apart from 2 things. The formatting in my resulting Word document
doesn't quite match - the dates are coming across in mm/dd/yy format - not
dd/mm/yy format as required.

Also, any currency figures don't quite match either - if a value end in 0,
i.e. £1234.50, in my Word doc it appears as £1234.5 and misses out the last
0. Only does this with 0 value.

Any ideas??
 
G

Guest

All done - it was field switches in Word that was the solution.

All works a treat now.
 
G

Guest

H Marek

Open the document in Word and hit ALT-F9

Add the appropriate Field Switches to the merged fields.

e.g.
{MERGEFIELD "Date" DATE \@ DD/MM/YYYY}
{MERGEFIELD "Total" \# "£0,###.00"}

where Date and Total are re-named to your fields.

Cheers.

BW



£15,503.00
 

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