Reply
 
Thread Tools Display Modes
  #1   Report Post  
MrSWF
 
Posts: n/a
Default 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   Report Post  
Doug Robbins
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Legal terms added to spell check Diane Paull Microsoft Word Help 1 June 5th 05 04:32 PM
Is there a quick way to make a glossary in a Word document withou. c_angler Microsoft Word Help 2 March 15th 05 05:33 PM
How do I set up a glossary of terms Microsoft Word Glossary_guy Tables 1 January 11th 05 04:23 PM
Referenced voices in a glossary GRL Microsoft Word Help 3 January 9th 05 05:27 PM
glossary of terms Cindy M -WordMVP- Tables 0 October 28th 04 06:09 PM


All times are GMT +1. The time now is 11:45 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"