Try This |
| Jason S replied to Sathish N at 03-Jul-08 09:46 |
here are 2 different things you can use: 1: Set objXML = CreateObject("Microsoft.XMLHTTP") Set objFile = CreateObject("Scripting.FileSystemObject") objXML.Open "GET", "http:<public address>/RemotemergeFile.txt", False objXML.Send strmergedata = objXML.responseText strmergeFile = "\\<local address>\My data sources\LocalmergeFile.txt" Set objTextStream = objFile.OpenTextFile(strmergeFile, 2, True) objTextStream.Write strmergedata with ActiveDocument.mailmerge .OpenDatasource Name:= strmergeFile .Execute Pause:=False end with
2:
<% Response.ContentType = "application/msword" Response.AddHeader "Content-Disposition", "attachment; filename=LabelExport.doc" %>
Use a SQL query or web service to retrieve your name/address results. Here's a CSS style. Notice the "@page"
<style> .barcode { font-family: IDAutomationHC39M; font-size: 10pt; } TD { font-family: Arial; font-size: 12pt; } @page Section1 { size:3.5in 1.0in; margin: .10in .15in .0in .15in; mso-page-orientation:landscape; } div.Section1 { page:Section1; } </style> Output code enclosed inside of a div
response.Write "<div class=""Section1"">" ... response.Write "</div>"
Output a page break after each label
response.Write "<br clear=all style='page-break-before:always'>" |
|