Link to home
Start Free TrialLog in
Avatar of Jini Jose
Jini JoseFlag for India

asked on

Mail Merger, SQL , Asp.Net VB

am new to Mail Merge.

I have to build a mail merge application in ASP.net VB.
The end user will update a Mail merger document template, then the other end users can able to merge the database values with the uploaded document and can download the new merged doocument with data.

any help or link ?
Avatar of mr_nadger
mr_nadger
Flag of United Kingdom of Great Britain and Northern Ireland image

Which type of document are you trying to create a template for and how will it be mailed out? (or is it just to create a word doc which can be saved manually to the user's drive?)

We have something where a user provides a Word template, and other users can create saveable/printable documents with fields dragged into from the database. Is that what you're after?
ASKER CERTIFIED SOLUTION
Avatar of mr_nadger
mr_nadger
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jini Jose

ASKER

@mr_nadger

any user can upload a Mail Merge Template. that user or any other user in that company can then select that template. Then the user need to search for the records. after finding the records the user can merge the selected records to the selected mail merge document. The user then download the merged document.
the selected records may have hundreds of records. each records should appear in seperate page of the new document.
In your provided example is it possible ?
ok, that sounds a little more complicated in that you'd need to have the code for uploading the template be able to map the merge fields to the database table's columns, then you should be able to handle the fields iteratively when it comes to printing them.
it really depends on what you're trying to deliver in the document, if it's large amounts of data, reporting services may be a better option for you
it is just printing some address labels. The option is user can upload their desired format.
and for mapping the database fields are limited. Just like name, address, phone, postal code etc..
if the template has the page breaks set up correctly and the printer is loaded with labels, this should work fine; the formatting should be handled by the template rather than the data you're inserting.
so the recordset having 10 records and if I use your code, it will generate 10 pages ?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
forgot to ask, when is the print run supposed to happen? Will the user just print them as required, or will the labels be queued/scheduled on a central printer?
the user wants to take print out the whole address of the employees. but the format for the output is different depending upon the requirement.
so the user can upload a mail merge template.
then he search for the corresponding records. for eg:- the employees who resides in India.
then he select the available template to merge the data.
after that he click the generate then the system will generate the merged document.
and then show a link to download the merged document.

for eg; the user uploads the template with the following information, Name, Address , Postal code
then he search for the records. suppose he get 100 records.
then he select the template and click merge.
so the out put document should have 100 pages or 25 pages with 4 records each in a page. that depends upon the uploaded mail merge documenet.
"forgot to ask, when is the print run supposed to happen? Will the user just print them as required, or will the labels be queued/scheduled on a central printer?"

when the user clicks on "merge document" or "print label" the system generates the document and will show the download option.
ok, so you're building a result set on the ASP page, with results present in a gridview or similar object, then some selection method for the labels (dropdown list or radiobutton list etc)...

Let me have a think on this one, I'll need to check the coding for templates as the label templates allow lists to be referenced.
SOLUTION
Avatar of Racim BOUDJAKDJI
Racim BOUDJAKDJI
Flag of Algeria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hi all

thanks for your help

lastly i developed the code. once i got the time to write an article i will post it in detail.
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.