Can Put A Button On Form To Create Mail Merge Letter?
May 8, 2012
I have a database for my business, which lists clients details. Within this, I have a query that runs off receipts (one customer, many receipts), as I run a private school and people pay me monthly. I use this query to run off a Mail Merge letter within Word, but it's difficult, having to close the db and open a Word document and then relink it.
Is there any way that some coding could be used within the db so that I can add a button and just print out that record into a mail merge document?
View Replies
ADVERTISEMENT
Aug 20, 2013
I basically have a form which the record source is either from a table or query and all I would like to do is to have a button which when pressed will open up a previously created word template and insert all relevant fields into the template. First Name, Last Name, Address etc.
View 1 Replies
View Related
Apr 6, 2015
I am using an MS Access 2010 table as a data source for a mail merge. I would like to update a field in the table with the date that the letter is printed. Is there a way to do this?
View 5 Replies
View Related
Jan 11, 2014
I am looking to perform a mail merge from access to Publisher. I have linked everything together and got everything looking the way that I want it to look however...
What I want to do is when I perform the mail merge I would like publisher to save a copy of each individual record from the database as a specific file based on one field of the mail merge.
I will try to clarify...
One of the mail merge fields is ClientAccountNumber I would like the merge to save a copy of the publisher file into c:mailmerge as a PDF including the year 2014.
So this file(s)for example would look like
C:mailmerge123456 - 2014.pdf C:mailmerge123457 - 2014.pdf etc...
Code:
Sub MailMerge()
'
' Macro1 Macro
Dim TempDocCreate
Dim FileNameTemp As MailMergeDataField
Set FileNameTemp = Application.ActiveDocument.MailMerge.DataSource.DataFields.Item("Box 22 Rcp Acct No")
With ActiveDocument.MailMerge.DataSource
Application.ActiveDocument.ExportAsFixedFormat pbFixedFormatTypePDF, Filename:= _
"L:Operations DatabaseProjects1042PublisherPDF2011 Merge" & "FileNameTemp" & " - 2011" & ".pdf"
End With
View 6 Replies
View Related
Feb 7, 2005
Hey guys,
I have spent a while surfing around the site for the answer to this problem but to no avail.
I have a form with a command button which when pressed opens a Word Document. It's a mail merge template and I want to be able to automate the actual merge (merge to new a new Word document) as soon as the Word document opens.
Any help with this would be greatly appreciated. I am using the code below and cannot get the objWord.MailMerge.Execute line to work.
Rusty
:D
Private Sub cmdOK_Click()
On Error GoTo Err_cmdOK_Click
' Declare variables
Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim varItem As Variant
Dim strCriteria As String
Dim strSQL As String
'Dim objWord As Word.Document
' Get the database and stored query
Set db = CurrentDb()
Set qdf = db.QueryDefs("qryMultiSelect")
' Loop through the selected items in the list box and build a text string
For Each varItem In Me!lstTrials.ItemsSelected
strCriteria = strCriteria & ",'" & Me!lstTrials.ItemData(varItem) & "'"
Next varItem
' Check that user selected something
If Len(strCriteria) = 0 Then
MsgBox "You did not select any Trials from the list." _
, vbExclamation, "Nothing to find"
Exit Sub
End If
' Remove the leading comma from the string
strCriteria = Right(strCriteria, Len(strCriteria) - 1)
' Build the new SQL statement incorporating the string
strSQL = "SELECT * FROM Trials " & _
"WHERE Trials.[Name of Trial] IN(" & strCriteria & ");"
' Apply the new SQL statement to the query
qdf.SQL = strSQL
' Open the MailMerge template
Call Shell("""C:Program FilesMicrosoft OfficeOfficeWINWORD.EXE"" ""O:ASWCSRecruitment dataCTU Cancer Trial Monthly UpdatesMonthlyUpdateTemplate.doc""", 1)
'objWord.MailMerge.Execute
' Empty the memory
Set db = Nothing
Set qdf = Nothing
Exit_cmdOK_Click:
Exit Sub
Err_cmdOK_Click:
Resume Exit_cmdOK_Click
End Sub
View 11 Replies
View Related
Jul 16, 2013
I am using mail merge to add info from my database to my word document template. I want to make it the same as my form I have set up which gives me a patient name, dob, GP details as head of main form then a subform (continuous) of their medication. When I try a mail merge it comes up right but only shows one medication on each page. I want it to add all their medications to the body and have the patient info in the heading. Do-able?
View 3 Replies
View Related
Nov 17, 2004
I need to add a basic button on a form that would populate the current on-screen data in a form letter. The fields I have are name, address, city state zip and amount. I currently have the basic buttons on my form - Search, Next, Previous,Add, Delete Print Current Record.
Thanks in advance for your assistance.
View 1 Replies
View Related
Jul 20, 2005
When applicable, I have letters in Word already set up to show the cc: information at the bottom. However, Management needs a statement added to the bottom of the letters that ONLY show the cc:
I am having a slight problem trying to figure out how to make this statement show up only on certain letters.
Does anyone have any thoughts that could help me? I'd appreciate it very much.
View 2 Replies
View Related
Dec 28, 2005
I am totally new to Access and this is my first database.
I have a database for volunteers in which table A is basically a calendar and table B a list of volunteers with their details.
What I want to do is construct a report that will allow me to produce a mail merge letter such that:
1. One volunteer, with his/her information, is selected from table B and inserted into a mail merge letter. (The volunteer selected will change from letter to letter).
2 Certain days are selected from table A and added to the mail merge letter. This information will be the same in all letter.
I have posted a separate thread asking how I can make the selection of days in (2) above so you can assume that I know how to make the selection within table B.
How do I proceed?
If anyone knows a good example of this type of report then i will be extremely grateful.
View 3 Replies
View Related
Jan 23, 2006
I have a table that has, among others, Address1, Address2 and Address3. If Address2 andor Address3 are empty for a particular record, I get blank lines in the Word doc. How do I prevent these blank lines?
View 2 Replies
View Related
Apr 12, 2006
Hi, i have set up a mail merge between a query and a word document. My system is a system that processes transactions from an online cd shop. I have made it so that each cd that is bought by each customer is a different transaction in a transaction table, and each transaction is given an order number to group them. How do i get the mail merge to show all the transactions in an order on the invoice in my word doc because at the moment, even if i add two of the title name fields, they both show the same transaction.
View 4 Replies
View Related
Apr 2, 2007
Anyone have a good online resource for generating a single thank you letter, eg. by way of a mail merge using MS Access 2003 with Word 2003? I know you need to write a form letter first with various fields that conincide with fields in Access. I have done this many times with large mailings but need to know how to write individual letters for thank yous, invites, etc.
Thanks in advance
View 4 Replies
View Related
Feb 15, 2007
Hi,
I am editing the design of a census, and I would like to be able to mail merge form the query directly to a new document in microsoft word...so you can create the document and then merge to it, is this possible using a macro or VBA? I can't work out how to do it!! The query name is "List of Families" and I want to merge to a blank document, so I can create a different document everytime...as the letters aren't circulars!
Chris
View 1 Replies
View Related
Oct 20, 2004
I just finished creating an access file. Here are the contents:
TABLE Customers - Includes email, contact name, company name, address, zip, city, etc.
TABLE Materials - Includes company name and material. Each record is listed as a company with a material requested. Companies are listed multiple times, as they are unique records because the materials are different.
I have Company name set up as the primary key, and it sets the relationship between the two tables
I have a Report fully working. The first page is a letter with the customers' mailing info at the top.
The second page is a list of all the materials this company ordered for the 2004 year.
The report pulls from a QUERY that comes from the customers table and the materials table.
This report is hundreds of pages long, as we have multiple customers who order many materials each.
My question is "How do I mail merge this report out to the customer?" I do not want to send each customer the whole 500 page report, but only their specific record that they should receive.
I do not care if I have to merge with Word, Outlook, etc. I just dont want to have to send these out individually.
I hope that makes some sense.
PLEASE HELP!
-Preston
View 3 Replies
View Related
Jul 20, 2005
When applicable, I have letters in Word already set up to show the cc: information at the bottom. However, Management needs a statement added to the bottom of the letters that ONLY show the cc:
I am having a slight problem trying to figure out how to make this statement show up only on certain letters.
Does anyone have any thoughts that could help me? I'd appreciate it very much.
View 6 Replies
View Related
Jan 17, 2008
Im after a bit of advice really. Im looking at building a mail merge facility, i already have one example where you have to select the letter you want to merge the data to.
The problem i have with this at the moment is i have allot of letters that are all basically very similar and the user might pic the wrong one, each letter is slight different and runs by a contract name.
Is there a way that the user can just select the type of letter they want, then select teh contract and then when they click the mail merge button access will know which letter to open.
Just looking for possible ways or examples.
Thanks
View 5 Replies
View Related
Jul 1, 2005
I'd like to set up a mail merge that pulls information from individual records. For example... If I want to do a pre-formated Fax Cover Sheet in Word, and fill the information in with the mail merge.
I don't want this to pull information from all of the records. I want to choose which record to pull the information from. First of all, can this be done? If so, can someone help me out with this? I have no idea where to even begin with this one. I have several mail merge documents set up right now that pull information from queries, but this is something that I'd like to do that is completely different.
Thanks in advance for any help that you can give.
View 3 Replies
View Related
Aug 31, 2005
What is the advantage of using mail merge?
It has been suggested to me that i use mail merge in the current application that im building. This is mainly because my client needs to send a lot of custom letters that will be different each time one is sent.
From what i know about mail merge you can only display information in a document in a flat format ie u couldnt have customer details at the top and then a table of all the orders/ transactions they have carried out below? is this correct?
View 1 Replies
View Related
Dec 7, 2005
Hi, could anyone teach me how to do this? Thanks in advance!
Here is the result of a query I have:
PersonEmail ProductAmountCategory
AA@hotmail.comApple10Fruit
AA@hotmail.comOrange20Fruit
AA@hotmail.comPen30Office
BB@hotmail.comApple15Fruit
BB@hotmail.comOrange25Fruit
BB@hotmail.comPen35Office
CC@hotmail.comApple18Fruit
CC@hotmail.comOrange28Fruit
CC@hotmail.comPen38Office
What I need to do is the develop a report, in a format like:
Person:A
Category
FruitAmountOfficeAmount
Apple10Pen30
Orange20
Total30Total30
Do this for A,B,and C and send the individual report in via email to them. To me it looks like a mail merge, but I don't know how to manipulate the data and put it into the layout. My real data has a lot of data, about 100 person, and about 60 product that falls into two categories. Is there anyway easy and fast way to do this? Please help! Thank you very much!
View 2 Replies
View Related
Sep 13, 2006
The folks here have been a huge help to me as overseer of a database structure.
I wrote earlier about name and address databases I am using. immediately after entereing one new sets of client data, I will need to send to a letter by Word Mail Merge. I want to automate this with a button in the data entry form to be pushed when data entry is done. In other words, rather than having Word pull data from Access, I want Access to push data upon hitting the button, into a Word document If I could automate a printer to this, it would further save me steps to get the ultimate letter out ( two letters, of which one is chosen per client).
I hope first of all that this makes some sense. Then I hope one of you Access gods can help me as my brain is wisted by all this thinking and trying...
Thank you again.
View 1 Replies
View Related
Feb 22, 2008
I have a database with lots of names and addresses. For the first time I am trying to set up a mail merge to do a mail shot, my problem is that I can get the mail merge wizard to work fine with the underlying address table but if I create a query to do selective mailings then mail merge comes up with nothing. The query does work and produces the required list of addresses but when I run it through the wizard it doesn't seem to be able to see anything. Any suggestions? I assume that it should work with queries..
thanks
Dennis
View 1 Replies
View Related
Jul 8, 2005
I wonder if there is a way to link two tables or queries to a word doc for mail merge. I have an investigative memo and many findings associated with it. They all in Access for record keeping. Now I want to merge the main memo with all findings into a word document. The trick part is that the memo is also different so I cannot have a uniformed letter pre-defined in word. The content of memo is coming from Access too. I don't know if there is a way to do it or simply have two independent mail merges and combine two words doc in one (how?, hate to copy and paste).
Suggestions are appreciated.
Good day and night.
View 1 Replies
View Related
Sep 24, 2004
Can some on explain to me what I need to install and how to send a personalized mail merge from Access. I would like to use the names and email addresses from my database to send individual emails to everyone in it. Where do I find the proper add on? Thanks alot. Alex
View 3 Replies
View Related
Sep 25, 2004
i've searched the whole friggin net and i can't find an answer to this so if anyone knows please advise.
when you use an access database query as your data source in a MS Word mail merge. then, you go to queries. here there are two tabs: Filter and Sort.
here is my problem...why can't i sort??? the filter tab is functional but the sort tab is grayed out and unusable. i just can't figure out why!
thanks in advance!
View 2 Replies
View Related
Nov 19, 2004
I am using a query for a word mail merge and would like to maintain the formating from Access into Word. Is this possible and if so how. If not, anyone have a clue how to do it in Word... I am importing the date and would like it to be long version (Friday, November 19, 2004) and it's giving me the short version (11/19/04),
Thanks and have a great weekend!
View 2 Replies
View Related
Feb 20, 2006
I am trying to create a mail merge macro that will automatically run when I open up my main document. I am using the RunApp command in Access to open up the main document. This is the code that runs the mail merge and it works fine when I go into Macros and run it. I just want it to run on its own. I know to get it to run on its own you have to use the AutoExec but I just can't figure it out.
Sub MailMerge()
'
' MailMerge Macro
' Macro recorded 2/20/2006 by melissa
'
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
End Sub
Any help would be great!
View 2 Replies
View Related