Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-18-2021, 04:20 PM
pmcgahan75 pmcgahan75 is offline to print tickets the owner must always be in the same row regardless of previous items Windows 10 to print tickets the owner must always be in the same row regardless of previous items Office 2019
Novice
to print tickets the owner must always be in the same row regardless of previous items
 
Join Date: Sep 2021
Posts: 1
pmcgahan75 is on a distinguished road
Default to print tickets the owner must always be in the same row regardless of previous items

I am printing exhibitor tickets using mail merge. The length of the data in the merge fields varies in length depending on the items being exhibited. But the row in the lower part of the ticket must always be in the same row regardless of how many rows are above.

Is there any way to anchor a row so that it does not move up or down regardless of the number of rows above? The merge file prints on a pre-printed form (TicketForm.pdf).

In the merge file each sheet is a table with two rows with three tickets per row. At first I tried making the claim ticket its own row, which kept it in place, but the exhibitor name and ID would update to the next exhibitor before all the previous exhibitors items were listed.

There are normally 800 to 900 entries in the fair, and I have to fix each ticket manually unless there is a way to anchor that row. I am not a sophisticated user, but can usually mange to find a way to solve a problem. Any help would be appreciated.



Files:
1) Merge2021_TicketChildOrange.pdf, the Word merge file
2) 2021_TicketChildOrange.pdf, the resulting output. Notice the ID line moves up or down depending on the length of the data for each merge item.
3) TicketForm.pdf
Attached Files
File Type: pdf Merge2021_TicketChildOrange.pdf (13.8 KB, 3 views)
File Type: pdf 2021ChildTickets.pdf (22.5 KB, 2 views)
File Type: pdf TicketForm.pdf (142.4 KB, 1 views)
Reply With Quote
  #2  
Old 09-19-2021, 03:06 AM
gmayor's Avatar
gmayor gmayor is offline to print tickets the owner must always be in the same row regardless of previous items Windows 10 to print tickets the owner must always be in the same row regardless of previous items Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,620
gmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to behold
Default

I suspect there is no simple way to address this during the merge, however should be simple enough to produce a macro to ensure there were the appropriate number of empty paragraphs in each cell to produce the required spacing after the merge.
The following macro assumes that there are twelve empty paragraphs and four populated paragraphs at the top of each cell (including 1 value below the coloured line). Merge to a new document and then run the macro.

Code:
Sub Macro1()
'Graham Mayor - https://www.gmayor.com - Last updated - 19 Sep 2021
Dim oTable As Table
Dim oCell As Cell
Dim oRng As Range, oLast As Range
Dim i As Long, j As Long, k As Long, m As Long

    For Each oTable In ActiveDocument.Tables
        For Each oCell In oTable.Range.Cells
            Set oRng = oCell.Range
            j = 0: m = 0
            For i = 1 To oRng.Paragraphs.Count
                If Len(oRng.Paragraphs(i).Range) > 2 Then
                    j = j + 1
                Else
                    m = m + 1
                End If
            Next i
Debug.Print j & vbTab & m
            If j > 4 And m = 12 Then
                For k = 5 To j
                    Set oLast = oRng.Paragraphs(oRng.Paragraphs.Count - 1).Range
                    oLast.Delete
                Next k
            End If
        Next oCell
    Next oTable
lbl_Exit:
    Set oTable = nothinh
    Set oCell = Nothing
    Set oRng = Nothing
    Set oLast = Nothing
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 09-19-2021, 04:42 PM
Guessed's Avatar
Guessed Guessed is offline to print tickets the owner must always be in the same row regardless of previous items Windows 10 to print tickets the owner must always be in the same row regardless of previous items Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 2,721
Guessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to behold
Default

I would set up each ticket in two table cells rather than one. The paragraph of text that always needs to be in the same position goes into the second cell.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #4  
Old 09-20-2021, 02:26 AM
gmayor's Avatar
gmayor gmayor is offline to print tickets the owner must always be in the same row regardless of previous items Windows 10 to print tickets the owner must always be in the same row regardless of previous items Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,620
gmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to behold
Default

See revised answer below
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 09-20-2021, 02:46 AM
gmayor's Avatar
gmayor gmayor is offline to print tickets the owner must always be in the same row regardless of previous items Windows 10 to print tickets the owner must always be in the same row regardless of previous items Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,620
gmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to behold
Default

Quote:
Originally Posted by Guessed View Post
I would set up each ticket in two table cells rather than one. The paragraph of text that always needs to be in the same position goes into the second cell.
I thought of that but where there are next record fields involved, the merge goes across then down, so the lower cell in the first column will have the value from the cell in the top of the third column.
What you could do to get around this is to use a SET field to record the value required in the upper cell and a REF field to reproduce the value in the lower cell. Thus in

cell row 1 column 1
SET A { MERGEFIELD FIELDNAME } }
cell row 1 column 2
SET B { MERGEFIELD FIELDNAME } }
cell row 1 column 1
SET C { MERGEFIELD FIELDNAME } }

Then for the lower cells

Cell row 2 column 1
{ REF A }
Cell row 2 column 2
{ REF B }
Cell row 2 column 3
{ REF C }

Repeat from Row 3
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #6  
Old 09-20-2021, 04:27 PM
Guessed's Avatar
Guessed Guessed is offline to print tickets the owner must always be in the same row regardless of previous items Windows 10 to print tickets the owner must always be in the same row regardless of previous items Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 2,721
Guessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to beholdGuessed is a splendid one to behold
Default

OK, if two rows fail as you describe then more conceptual alternatives would be worth exploring.

I think the easiest alternative is to rotate the page to landscape, turn everything in the table cells 90 degrees. This will ensure both cells are populated before the nextRecord is reached.

Perhaps using a frame for the lower text would work if each frame was anchored to the first paragraph in the cell

Another alternative would be to slide on over to Microsoft Access to create the report
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply

Tags
anchor, merge

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
to print tickets the owner must always be in the same row regardless of previous items creating tickets starting at 001 mab5119 Mail Merge 1 02-07-2018 06:51 PM
Change name of document owner when writing comments Mark Laslett Word 2 08-25-2015 01:03 PM
owner and delegate question for outlook 2013 tik0pek205 Outlook 0 12-17-2014 08:02 AM
tickets numbering frenchyinpaddyland Publisher 0 04-27-2012 01:02 PM
Sharing Calenders, How to delete a clander without an owner! HeyRobi Outlook 0 05-15-2007 09:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:52 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft