Home |
Search |
Today's Posts |
#1
|
|||
|
|||
mailmerging glossary terms into doc
Hi,
I need to create some kind of mailmerge that links a Word doc to a single file (Excel, Access, whatever) which contains an extensive glossary, and let the user pick wich terms from that glossary want to include in the active doc. Any help will be much appreciated. MrSWF |
#2
|
|||
|
|||
I would create a userform containing a multiselect listbox that would be
populated with all of the items. The user could then select from the listbox the items to be included. The following routine will load such a listbox Private Sub UserForm_Initialize() Dim db As DAO.Database Dim rs As DAO.Recordset Dim NoOfRecords As Long ' Open the database Set db = OpenDatabase("D:\Access\ResidencesXP.mdb") ' Retrieve the recordset Set rs = db.OpenRecordset("SELECT * FROM Owners") ' Determine the number of retrieved records With rs .MoveLast NoOfRecords = .RecordCount .MoveFirst End With ' Set the number of Columns = number of Fields in recordset ListBox1.ColumnCount = rs.Fields.Count ' Load the ListBox with the retrieved records ListBox1.Column = rs.GetRows(NoOfRecords) ' Cleanup rs.Close db.Close Set rs = Nothing Set db = Nothing End Sub and to for the code to determine which items are selected, See the article "How to find out which Items are selected in a Multi-Select ListBox" at: http://www.word.mvps.org/FAQs/Userfo...lectValues.htm -- 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 "MrSWF" wrote in message ... Hi, I need to create some kind of mailmerge that links a Word doc to a single file (Excel, Access, whatever) which contains an extensive glossary, and let the user pick wich terms from that glossary want to include in the active doc. Any help will be much appreciated. MrSWF |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Legal terms added to spell check | Microsoft Word Help | |||
Is there a quick way to make a glossary in a Word document withou. | Microsoft Word Help | |||
How do I set up a glossary of terms Microsoft Word | Tables | |||
Referenced voices in a glossary | Microsoft Word Help | |||
glossary of terms | Tables |