Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / April 2007

Tip: Looking for answers? Try searching our database.

Find record faster in mail merge

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul - 06 Apr 2007 14:56 GMT
I have created a mail merge using an Access query via an ODBC linked table.

My question is there a way to speed up searching for a specific record in a
specific field?

Paul
Doug Robbins - Word MVP - 06 Apr 2007 17:23 GMT
Doing it from Access will be the quickest way.  See fellow MVP Albert
Kallal's
"MergeSingleWord" utility at:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

Signature

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

>I have created a mail merge using an Access query via an ODBC linked table.
>
[quoted text clipped - 3 lines]
>
> Paul
Paul - 06 Apr 2007 17:40 GMT
Already thought of that, no can do. Don't have enough licenses for Access.

Thanks for the help though!

> I have created a mail merge using an Access query via an ODBC linked table.
>
> My question is there a way to speed up searching for a specific record in a
> specific field?
>
> Paul
Doug Robbins - Word MVP - 06 Apr 2007 19:35 GMT
I assume that what you are wanting to do is create one document at a time
from records in a database.  If that is the case, instead of using
mailmerge, create a template in which you have a userform and use the
following code to populate a List box on a userform that then populate
document variables with the data from the selected record and have it
displayed in the document that is created from the template by having
DOCVARIABLE fields in the template.

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

Signature

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

> Already thought of that, no can do. Don't have enough licenses for Access.
>
[quoted text clipped - 8 lines]
>>
>> Paul

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.