WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Refresh Merge Records

 
   Home -> Office -> MailMerge Fields RSS
Next:  mail merge attachment  
Author Message
Dave C

External


Since: Oct 03, 2004
Posts: 27



(Msg. 1) Posted: Tue Nov 11, 2008 1:34 pm
Post subject: Refresh Merge Records
Archived from groups: microsoft>public>word>mailmerge>fields (more info?)

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
Back to top
Login to vote
Peter Jamieson

External


Since: Aug 10, 2004
Posts: 2198



(Msg. 2) Posted: Wed Nov 12, 2008 1:34 am
Post subject: Re: Refresh Merge Records [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <DaveC RemoveThis @discussions.microsoft.com> wrote in message
news:6EB1E801-218D-466A-ABE6-696CF1B087AE@microsoft.com...
>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
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> MailMerge Fields All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET