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'>"


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  Printing Address labels from WebApplication - Sathish N  03-Jul-08 06:14 6:14:06 AM
      Check these links - santhosh kumar  03-Jul-08 06:47 6:47:38 AM
      solution to printing address labels from web app - Umapathy Kaliaperumal  03-Jul-08 06:49 6:49:53 AM
      Try This - Jason S  03-Jul-08 09:46 9:46:50 AM
      Reply - alice johnson  03-Jul-08 01:26 1:26:47 PM
View Posts