473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Insert 'subform' in Word mail-merge?

13
I run a recruitment service for which, years ago, I set up an Access database to record details of job applications and run various mail merge functions including interview invitations, reference requests and panel letters.

However, my letters contain only the details that can be recorded in single fields. e.g. title, first name, last name, address1, address2, etc. Currently, where lists are involved, e.g. names of the interview panel, lists of applicants and interview times, we just have to type them in for each batch of letters.

These details are displayed on the database as a subform. My question is, is there any way to insert a subform straight into a Word document as part of the mail-merge - or does one have to pre-define the number of possible list items, e.g. applicant 1, applicant 2, or panel member1, panel member2, etc?

Any help would be appreciated.

Brigid
Mar 20 '07 #1
7 5448
MMcCarthy
14,534 Expert Mod 8TB
Hi Brigid

This is not my area of expertise but I would guess that the only way of doing this would be with complicated Word Automation VBA code using recordsets.

Mary
Mar 22 '07 #2
brynne
13
Hi Mary,

Thanks. I subsequently wondered whether I might get round the problem by creating a field that contains an array, e.g. AppID, AppName, IntTime, new line. I am sure I did something like this for a programming exercise (in Pascal!!) years ago, but I am not familiar enough with VBA to know if it is possible.

Does this sound feasible?

B
Mar 22 '07 #3
Denburt
1,356 Expert 1GB
I started to give this one a go earlier however like Mary stated this is not an area I have dealt with very much. I think you hit the nail on the head or at least real close. My first thought was to create a query based on the main table and the child table however this would probably send out many emails to each person. However if you created the query and converted it to a crosstab query it just might work. Word does recognize queries when you want to do a mailmerge.
Mar 22 '07 #4
Denburt
1,356 Expert 1GB
As an alternative you could send out the info straight from access. Create a report with the info you want. If you add something like the following to a button click event you could be good to go.

DoCmd.SendObject acSendTable, "Employees", acFormatXLS, _
"Nancy Davolio; Andrew Fuller", "Joan Weber", , _
"Current Spreadsheet of Employees", , False

Let me know if you need more details or if this does or doesn't help you out.
BTW if you paste this in the VBA window then highlight the word sendobject press F1 and get the full syntax for this method.
Mar 22 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
Regarding Deburt's idea of a Crosstab query ...

Something like ...
Expand|Select|Wrap|Line Numbers
  1. TRANSFORM ApplicantName
  2. SELECT JobRef
  3. FROM TableName
  4. GROUP BY JobRef
  5. PIVOT ApplicantName;
Mar 23 '07 #6
brynne
13
No reason why I need to print letters in Word at all really. Seems the simplest solution will be to recreate the letter as a report in Access.

Thanks to all.

B
Mar 23 '07 #7
Denburt
1,356 Expert 1GB
Your quite welcome, also there are other methods in MS Access that are even more robust. Let us know if we can be of any more assistance.
Mar 23 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Bill | last post by:
I'm having what seems to me to be an odd problem. Perhaps there is some explanation, but don't know at this point. Basically I have a form that tracks memberships and donations. The main form...
4
by: YFS DBA | last post by:
How do I use VBA to insert a *new* record into a subform? I have a master form with client information, and a sub form with billing information. I want to click on a button ("Add Data") and have...
2
by: lphuong | last post by:
Access 2000 I have a fldCreateDate on frmCustomer(mainform)and also a fldCreateDate on frmCustomerVisit(subform). They are one to many relationship. On the main form, frmCustomer, I have a...
3
by: Nicolae Fieraru | last post by:
Hi All, I have a problem and I can't figure out how to solve it. My database has three tables: tblCustomers, with CustomerId and CustomerName tblProducts, with ProductId and ProductCode...
2
by: Paul T. RONG | last post by:
Hello there, I have a main form frmOrder and inside a subform sbfrmOrderDetail. When I add records from main form to subform, it is alright when the records don't exceed 40 rows (the subform's...
18
by: Darryl Kerkeslager | last post by:
I don't do much with subforms - in fact I've deliberately avoided them - but .... I have a tab control that will contain several subforms, each bound to a separate table, and each table/subform...
5
by: tdmailbox | last post by:
I have a form with a child form. In the child form there is a list of names that can grow quite large. On the parent form I want to display the first name from the child form. I set up a test...
1
by: Holmsey | last post by:
Hello All, I am creating a database form that has 5 tabs, with each tab holding a subform. On the first tab I want to Highlight certain words that appear in one of the subforms. The words I am...
11
by: cooperkuo | last post by:
Dear all, I have a question about ADO in the subform. I know how to use ADO to insert/update/select data into the sigin form, but wehn I try to do it in the form with subform((Datasheet). I don't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.