• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

Help Don't know vb.

I have directed to create a word document that would pull data from a sql2k db into a word document and have that document formated correctely(margins, tabs etc..)
the current way that this information is being displayed is thru the web, but in doing that it loses its formating and printing is a nightmare.

the current format for this document would be

document header (centered onthe page)

date                                                                                        

name1                                                                             name3
company1                                                                        company3
address1-1                                                                       address1-3
address2-1(if not null)                                                       address1-3(if not null)
city1, state1 zip1                                                               city3, state3 zip3

name2                                                                             name4
company2                                                                        company4
address1-2                                                                       address1-4
address2-2(if not null)                                                       address1-4(if not null)
city2, state2 zip2                                                               city4, state4 zip4


Page #

can anyone help with some guidance on how to do this.
0
jriver12
Asked:
jriver12
1 Solution
 
Arthur_WoodCommented:
looks like what you eed to do is a variation of 'MAIL-MERGE', but you want to create labels.

Open Word, then under the Tools menu button, click on Letters and Mailings, then Select Mail Merge.  You can then follow the instructions from the Wizard.

AW
0
 
JpmSoftCommented:
I think that if you plan to put those "reports" on the web again, Word is not the right answer to your problem...

You might try to test Crystal Reports or other reporting tools like this.

JPM
0
 
unknown_routineCommented:
should there only be 4 name section on the page?
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
jriver12Author Commented:
nO it can be any number. I have tried the suggestion by Arthur_Wood, but
in doing so I would still have to have the user format per the correct sort order, and the pages would have to be predefined and if any number of records is added the template would have to be altered to accomodate that new record.
0
 
David LeeCommented:
Pulling the data into a Word document probably isn't the problem.  The problem is saving the Word document in HTML format.  So long as the document is saved in Word, or possibly even RTF, format, then it should retain all its formatting even when displayed on the web.  The real issue is that HTML formatting doesn't give you all the formatting features that a Word document has.  Another alternative would be to save the file in Adobe Acrobat format, assuming you have Acrobat.  
0
 
jriver12Author Commented:
I don't need it to be saved back into html. just need it to be in word.
0
 
David LeeCommented:
Sorry to be dense but I'm lost on what you're looking for.  From your original post I thought you already had created the document in Word and had discovered that when posted to a web site its formatting was screwed up.  So I thought the question was how to avoid having the formatting go away.  But now it sounds as if you're asking how to create the Word document.  Or maybe I'm still misunderstanding and it's something altogether different.  Could you clarify what it is you want us to answer?
0
 
jriver12Author Commented:
No, I don't have to post it to the web.

I am using coldfusion to pull the data from the db to the browser, however formating when printing is an issue, I am looking for a way to pull the data from the db into a word document so that the user can format it (margins, pagebreaks and record order).

know that the query sorts and orders the data but when pulled into a mailmerge that order is lost.

the way it should be is:

rec1                   rec3
rec2                   rec4

the way mailmerge pulls is:
rec1                   rec2
rec3                   rec4.

hope this clarified it.
0
 
David LeeCommented:
jriver12,

Can you provide details about the data coming in from the db?  Specifically, please describe the formatting you need it in inside the document.  Also, will each record be the same length (i.e. occupy the same number of lines in the document)?  Any other formatting details you can provide would be useful.  

You mention "... so that the user can format it ..." in your description.  Does that mean that all you really need is to get the data into a Word doc and then the user will do the rest, or do you really want a fully formatted document?
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

Tackle projects and never again get stuck behind a technical roadblock.
Join Now