We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Help Don't know vb.

jriver12
jriver12 asked
on
Medium Priority
244 Views
Last Modified: 2010-05-02
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.
Comment
Watch Question

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

Commented:
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
should there only be 4 name section on the page?

Author

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.
CERTIFIED EXPERT
Top Expert 2010
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

Author

Commented:
I don't need it to be saved back into html. just need it to be in word.
CERTIFIED EXPERT
Top Expert 2010

Commented:
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?

Author

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.
CERTIFIED EXPERT
Top Expert 2010

Commented:
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?
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.