Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Heartland Heartland is offline
external usenet poster
 
Posts: 1
Default mail merge reserved tickets

I'm trying to set up a mail merge to print reserves seating on event tickets.
Suggestions on setting up the Excel data for repeating seat numbers by seat
row needed?
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP on news.microsoft.com Doug Robbins - Word MVP on news.microsoft.com is offline
external usenet poster
 
Posts: 407
Default mail merge reserved tickets

I assume that you mean

A1, A2, ...An
B1, B2,...Bn
etc.

Simplest way would be to put

A in the first cell of the second row i,e, Cell A2 (the first row being for
field names) and 1 in the second cell of the second row (i.e. Cell B2, then
in the first cell of the third row Cell A3 , put the formula = A2 and in
cell B3 put the formula = B2 + 1. Then copy Cells A3:B3 down as many rows
as required to until you get to An.

Then select the range A2:Bn+1 and paste it below as many times as you have
rows, and then go and change the A to B in the first row where the number
reverts to 1 and likewise for the rest of the rows of data.

However, if you run a macro containing the following code when you have a
blank document as the active document in Word, it will create a table in
that document that can be used as the data source
Sub MakeTicketData()
Dim rows As Long, seats As Long, i As Long, j As Long
Dim datatable As Table
Dim datarow As Row
rows = InputBox("Enter the number of rows.", "Rows")
seats = InputBox("Enter the number of seats.", "Seats")
Set datatable = ActiveDocument.Tables.Add(Selection.Range, 1, 2)
datatable.Cell(1, 1).Range.Text = "Row"
datatable.Cell(1, 2).Range.Text = "Seat"
If rows 27 Then
For i = 1 To rows
For j = 1 To seats
Set datarow = datatable.rows.Add
datarow.Cells(1).Range.Text = Chr(64 + i)
datarow.Cells(2).Range.Text = j
Next j
Next i
Else
For i = 1 To 26
For j = 1 To seats
Set datarow = datatable.rows.Add
datarow.Cells(1).Range.Text = Chr(64 + i)
datarow.Cells(2).Range.Text = j
Next j
Next i
For i = 27 To rows
For j = 1 To seats
Set datarow = datatable.rows.Add
datarow.Cells(1).Range.Text = "A" & Chr(38 + i)
datarow.Cells(2).Range.Text = j
Next j
Next i
End If
End Sub

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Heartland" wrote in message
...
I'm trying to set up a mail merge to print reserves seating on event
tickets.
Suggestions on setting up the Excel data for repeating seat numbers by
seat
row needed?



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
Numbered tickets Jo Microsoft Word Help 1 October 26th 08 11:53 AM
Mail-Merge: Can we have master detail relationship or multiple entities in word Mail-Merge? gmax2006 Microsoft Word Help 1 March 28th 07 06:28 PM
customized numbering for raffle tickets Tickets:#A101 - 2000 Sabrina Microsoft Word Help 2 February 8th 07 09:30 PM
reserved words VBA Microsoft Word Help 3 September 23rd 06 08:16 PM
What are the reserved names for macros? JaneH Microsoft Word Help 4 October 6th 05 04:00 PM


All times are GMT +1. The time now is 02:27 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"