Hi Ray,

I've attached code that I use to generate Avery 5160 labels through Microsoft Word on the client's computer.

I have a results page that has a link to this page.

Note the fieldnames need to be changed to yours.. 

                        <p>#FirstA# #LastA#</p>
                        <p>#Addr1A#</p>
                        <p>#Citysta#, #State# #ZipA#</p>

I hope this helps!

Derek





<!--- Generate Avery Standard 5160 labels for our contacts.--->
<cfheader
    name="Content-Type"
    value="application/msword">
<cfheader
    name="Content-Disposition"
    value="attachment; filename=Labels01.doc">
           
<html>

    <head>
<style>
    @page Section1 {
        size:8.5in 11.0in;
        margin:.5in 13.6pt 0in 13.6pt;
    }
    div.Section1 {
        page:Section1;
    }
    table {
        mso-table-layout-alt:fixed;
        mso-padding-top-alt:0in;
        mso-padding-bottom-alt:0in
    }
    tr {
        page-break-inside:avoid;
        height:1.0in;
    }   
    td {
        padding-top:0in;
        padding-right:.75pt;
        padding-bottom:0in;
        padding-left:.75pt;
    }
    td.label {
        width:189.0pt;
    }
    td.spacer {
        width:9.0pt;
    }
    p {
        margin-top:0in;
        margin-right:5.3pt;
        margin-bottom:0in;
        margin-left:5.3pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
    }
</style>
   
    </head>   
      
   
       <!--- DO REGULAR QUERY HERE Query name in this file is "assocList" --->
   
   
    <body>
   
        <div class="Section1">
            <table
                border="0"
                cellspacing="0"
                cellpadding="0">
            <cfset col=1>
            <cfoutput query="assocList">
                <cfif col EQ "1">
                    <tr>
                </cfif>
               
               
                    <td class="label">
                        <p>#FirstA# #LastA#</p>
                        <p>#Addr1A#</p>
                        <p>#Citysta#, #State# #ZipA#</p>
                    </td>
               
                <cfif col LTE 2>
                    <td class="spacer"><p>&nbsp;</p></td>
                    <cfset col=col+1>
                <cfelse>
                    </tr>
                    <cfset col=1>
                </cfif>
            </cfoutput>
            <cfif col EQ "2">
                <td class="label"><p>&nbsp;</p></td>
                <td class="spacer"><p>&nbsp;</p></td>
                <td class="label"><p>&nbsp;</p></td>
                </tr>
            <cfelseif col EQ "3">
                <td class="label">
                    <p>&nbsp;</p>
                </td>
                </tr>
            </cfif>
            </table>
        </div>
    </body>
</html>


On 4/3/06, Ray Hughes < [EMAIL PROTECTED]> wrote:
Hi All,

My greenness is showing.  I am generating mailing labels.

However there are three labels in a row on the page.

I am looking for a way to use the query output to populate the three columns
before going to the next row.

Is there a way to select a specific record for the record set returned by
the query?

Example:

Query =jsdfssjdflsldk
Say this query returns 15 records

I want to be able to access record 1 & 2 & 3 .
Take the returned data and print labels for one row.

Then I want to select records 4 & 5 & 6.
Take the returned data for these records and print labels for one row.

And so on and so on.


Any suggestions?

Regards
Ray Hughes

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


_______________________________________________
Reply to DFWCFUG:
  [email protected]
Subscribe/Unsubscribe:
   http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
    http://www.mail-archive.com/list%40list.dfwcfug.org/
   http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
  www.HostMySite.com
  www.teksystems.com/

_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.HostMySite.com 
  www.teksystems.com/

Reply via email to