Access feds data to Ms Word

mrchonginhk

Well-known Member
Joined
Dec 3, 2004
Messages
679
Suppose I have a query outputing only one single record of only one field, eg "Peter".
I want it to show on Ms Word. If database query change later to "Mary", I want the Peter on Ms Word becomes Mary too.

I created a field code on Ms Word like this

{DDEAUTO MSAccess "C:\\File1.mdb;Table Table1" All \t}

It works. However, it also shows the header of the Access Table like this in Ms Word now:-

Name
Peter

What can I do to to remove the header 'Name' ?
Thanks
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Why not use Access's Merge-with-Word rather than Word's DDEAUTO field? When you do that, you'd use a merge field in Word instead, and the Access table's field name ("Name") becomes the parameter of that merge field, so all you get is Peter/Mary.

In Access <= 2003 you'd select the table in the database window's Tables, then pull down Tools / Office Links / Merge with Word. In Access >= 2007 you'd go to the External Data ribbon and click the Word Merge button. Either way you'll get a wizard which will allow you to use an existing Word document.
 
Upvote 0

Forum statistics

Threads
1,224,514
Messages
6,179,223
Members
452,896
Latest member
IGT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top