Taking Data from Access to Word Taking Data from Access to Word InsaneProgrammer (Programmer) (OP) 9 Mar 01 14:26 I have a word template and I want to fill some of the fields with data in an access db. I've tried writing some code using DAO but I'm not having much luck. Does anyone have any sugestions? THANKS! RE: Taking Data from Access to Word DarkSun (Programmer) 12 Mar 01 11:17 What sort of fields are you trying to fill. If you give me an example I will try and help. RE: Taking Data from Access to Word InsaneProgrammer (Programmer) (OP) 12 Mar 01 19:16 My database tracks the status of projects through our office. Who it is assigned to, when it was assigned, client info, and varies steps in the process. When a project is completed there is a form that is filled out by hand and signed. I created a template based on the form and would like to extract some information from access to speed up the process of filling out the form. Unfortunately, I can't just create a report in access because there is a whole bunch of other info that is also needed. Currently, when the completion data is entered on a project the word template automatically opens for the user to complete. It would really be useful if the name of the person working on the project, project cost, and various info could be taken directly from the database at this point. RE: Taking Data from Access to Word DarkSun (Programmer) 13 Mar 01 04:02 This is a simple bit of code that obtains the phone numbers from a database and places them in a combo box. With your example it sounds like you would just use some labels and fill the caption with the records you require.Dim VodaDB As DatabaseDim VodaRS As DAO.RecordsetPrivate Sub GetPhoneNumbers()Dim PhoneNumbers() As StringDim PhoneNumbersEN As IntegerDim FoundRecords As BooleanPhoneNumbersEN = 0FoundRecords = FalseSet VodaDB = DBEngine(0).OpenDatabase("c:\voda\d2210f0t.mdb")Set VodaRS = VodaDB.OpenRecordset("SELECT CTN FROM CTN")Do While Not VodaRS.EOF ReDim Preserve PhoneNumbers(PhoneNumbersEN) PhoneNumbers(PhoneNumbersEN) = VodaRS!CTN PhoneNumbersEN = PhoneNumbersEN + 1 FoundRecords = True VodaRS.MoveNextLoopComboBox1.List = PhoneNumbers()End SubYou have to make sure the DAO object library is loaded in word to make this work. It is under Tools-References in VB Editor.If you require anymore assistance I would be happy to help.