Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Dave C Dave C is offline
external usenet poster
 
Posts: 12
Default Refresh Merge Records

I have a Word mail merge document that retrieves its data from an Access
parameter query where the user is prompted to enter the unique employee
number. When opening the mail merge document the dialog box is displayed for
the user to enter the employee number and the respective merge fields are
populated.

Now my question ... after printing the first merged document (employment
contract) I need to be able to redisplay the query dialog box in order for
the user to enter a new employee number in order to refresh the query and
populate the merge fields with the new employee data.

Is there a predefined menu/toolbar option to do this, if not, what code
would I need to place in a command button to achieve this.

Thanks in advance for any assistance and guidance.

Dave


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Refresh Merge Records

A macro such as the following would probably be enough in this case as long
as you havenot entered so many criteria/sort options that the querystring
exceeds around 255 characters:

It works in Word 2003 anyway. I don't think there is a simpler way.

Sub requery()
With ActiveDocument.MailMerge
.OpenDataSource _
Name:=.DataSource.Name, _
Connection:=.DataSource.ConnectString, _
SQLStatement:=.DataSource.QueryString, _
subtype:=wdMergeSubTypeWord2000
End With
End Sub

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Dave C" wrote in message
...
I have a Word mail merge document that retrieves its data from an Access
parameter query where the user is prompted to enter the unique employee
number. When opening the mail merge document the dialog box is displayed
for
the user to enter the employee number and the respective merge fields are
populated.

Now my question ... after printing the first merged document (employment
contract) I need to be able to redisplay the query dialog box in order for
the user to enter a new employee number in order to refresh the query and
populate the merge fields with the new employee data.

Is there a predefined menu/toolbar option to do this, if not, what code
would I need to place in a command button to achieve this.

Thanks in advance for any assistance and guidance.

Dave



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
mail merge picture won't refresh automatically? JethroUK© Mailmerge 2 October 16th 07 05:55 PM
mail merge refresh data joe schmo Mailmerge 4 July 12th 07 09:57 AM
merge records are using too many decimal spaces when I use records from an Excel Database aspen Mailmerge 1 March 23rd 07 09:12 PM
Combine Mail Merge records when different records have 1 common fi TFFAV Mailmerge 1 December 12th 06 11:56 PM
Mail Merge Recipients refresh Recorder Mailmerge 0 January 12th 06 03:49 PM


All times are GMT +1. The time now is 07:05 PM.

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"