Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access XP and Word XP - setting up mail merge for end users

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
I have the application and I am just working on some improvements for the front end. I have about 30 mail merge letters (and 2 merge envelopes) set up for use with the records in this database.

I am working on setting up a menu with a button for each of the letters ( 2 menus, each with about 15 buttons - 1 for each letter)

Here are the things that I am looking at:

1) I tried some code from another post, but it is only opening Word, not the file.
Here is the code:
Code:
Private Sub cmdFirstLnIntLtr_Click()
On Error GoTo Err_cmdFirstLnIntLtr_Click
  Dim wd As New Word.Application
  Dim doc As Word.Document
  
  Set doc = wd.Documents.Open("G:\HR Candidate Hiring\Staff Merge Ltrs/First Line Intvw Ltr.doc" = strDoc, AddToRecentFiles:=False)

Exit_cmdFirstLnIntLtr_Click:
  wd.Visible = True
  Exit Sub
Err_cmdFirstLnIntLtr_Click:
    Resume Exit_cmdFirstLnIntLtr_Click
    
End Sub

2) I tried a hyperlink on a button ( or doesn't really need a button) but that brings up the web toolbar floating in the Word document, and I don't want it to do that.

3) When any of the merge letters are opened, I am presented with a message:
"Opening this document will run the following SQL command:
Select * From 'qrymailmerges'
data from your database will be placed in the document. Do you want to continue?

I would like this to be automatically answered with yes.

4) most people I know (including me) do not start Word with the task pane up, but for these merges, I would want the task pane to show on open, and set to the mail merge task pane, as the document is saved at the right point of the merge. This allows the user to edit the recipient list, and complete the merge.

If anyone has any suggestions, I would appreciate any help that I can get. Thanks!


misscrf

It is never too late to become what you could have been ~ George Eliot
 
here is a new approach. if anyone has any ideas to make this work, I would love to hear it.

here is where I have gotten... and havent gotten. I am hoping you can help me to connect the dots.

I have a form set up. Here is a screenshot:


The listbox has a query row/source - the same query that the mail merge documents are all set to.

the combo box comes from a table of the names of the letters.

now I just need to understand the code that needs to go into the command button.

I am looking to have

1) the user select their recipients (list box is multiselect)

2) choose the name of the letter

3) have the appropriate merge document run the query based on the listbox choices

4) merge the documents to a new document (1 letter for each recipient, never showing user the merge document, jsut the mergED document)

5) that should be it.

Any help would be wonderful!
Thanks


misscrf

It is never too late to become what you could have been ~ George Eliot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top