- Local time
- Today, 01:26
- Joined
- Feb 19, 2002
- Messages
- 45,426
This database presents an example of using VBA to fill bookmarked fields in a Word document. The Database is A2003 format. However, the only version of Word installed on my PC is W2007 so before using the example, you may need to open any code module and change the Word reference to whatever version you are using. The code will work with earlier versions of Word.
There is a single doument which for the sake of expediency in the example, has a hard-coded reference. You will most likely need something else.
The example also shows two ways to accumulate child records, One presents the data as a comma separated list and the other separates the columns with tabs and turns the glob into a table to which it then applies formatting. I left several formatting options in the code as comments.
I have started adding agreements to my samples. You are welcome to copy forms and code for your own use but you may not sell the sample database. I encourage you to share the sample with others but please do so without modifying it.
This app has not been tested on any PC but my own so if you have problems with it this week please post them in one of the forum sections and also send me a PM to make sure I see the issue.
I added a newer version and the word documents it uses. Feel free to make your own but you will need to modify the code if you want to add additional bookmarks since this sample is all hard coded.
There is a single doument which for the sake of expediency in the example, has a hard-coded reference. You will most likely need something else.
The example also shows two ways to accumulate child records, One presents the data as a comma separated list and the other separates the columns with tabs and turns the glob into a table to which it then applies formatting. I left several formatting options in the code as comments.
I have started adding agreements to my samples. You are welcome to copy forms and code for your own use but you may not sell the sample database. I encourage you to share the sample with others but please do so without modifying it.
This app has not been tested on any PC but my own so if you have problems with it this week please post them in one of the forum sections and also send me a PM to make sure I see the issue.
I added a newer version and the word documents it uses. Feel free to make your own but you will need to modify the code if you want to add additional bookmarks since this sample is all hard coded.
Attachments
Last edited: